Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ev3basic
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ev3basic
Commits
bb83a482
Commit
bb83a482
authored
Oct 02, 2015
by
c0pperdragon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EV3Explorer: Can filter files to see only basic programs in PC view
parent
3a658c84
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
EV3Explorer/ExplorerSettings.cs
EV3Explorer/ExplorerSettings.cs
+10
-0
EV3Explorer/MainWindow.xaml
EV3Explorer/MainWindow.xaml
+2
-0
EV3Explorer/MainWindow.xaml.cs
EV3Explorer/MainWindow.xaml.cs
+13
-2
No files found.
EV3Explorer/ExplorerSettings.cs
View file @
bb83a482
...
@@ -12,6 +12,7 @@ namespace EV3Explorer
...
@@ -12,6 +12,7 @@ namespace EV3Explorer
public
int
windowHeight
;
public
int
windowHeight
;
public
int
splitterPosition
;
public
int
splitterPosition
;
public
String
localDirectory
;
public
String
localDirectory
;
public
Boolean
onlyShowPrograms
;
public
ExplorerSettings
()
public
ExplorerSettings
()
{
{
...
@@ -19,6 +20,7 @@ namespace EV3Explorer
...
@@ -19,6 +20,7 @@ namespace EV3Explorer
windowHeight
=
600
;
windowHeight
=
600
;
splitterPosition
=
400
;
splitterPosition
=
400
;
localDirectory
=
""
;
localDirectory
=
""
;
onlyShowPrograms
=
false
;
}
}
public
void
Load
()
public
void
Load
()
...
@@ -49,6 +51,10 @@ namespace EV3Explorer
...
@@ -49,6 +51,10 @@ namespace EV3Explorer
{
{
localDirectory
=
line
.
Substring
(
9
).
Trim
();
localDirectory
=
line
.
Substring
(
9
).
Trim
();
}
}
if
(
line
.
StartsWith
(
"ONLYSHOWPROGRAMS"
,
StringComparison
.
InvariantCultureIgnoreCase
))
{
onlyShowPrograms
=
true
;
}
}
}
catch
(
Exception
)
{
}
catch
(
Exception
)
{
}
}
}
...
@@ -72,6 +78,10 @@ namespace EV3Explorer
...
@@ -72,6 +78,10 @@ namespace EV3Explorer
file
.
WriteLine
(
"HEIGHT="
+
windowHeight
);
file
.
WriteLine
(
"HEIGHT="
+
windowHeight
);
file
.
WriteLine
(
"SPLITTER="
+
splitterPosition
);
file
.
WriteLine
(
"SPLITTER="
+
splitterPosition
);
file
.
WriteLine
(
"LOCALDIR="
+
localDirectory
);
file
.
WriteLine
(
"LOCALDIR="
+
localDirectory
);
if
(
onlyShowPrograms
)
{
file
.
WriteLine
(
"ONLYSHOWPROGRAMS"
);
}
file
.
Close
();
file
.
Close
();
}
}
catch
(
Exception
)
{
}
catch
(
Exception
)
{
}
...
...
EV3Explorer/MainWindow.xaml
View file @
bb83a482
...
@@ -51,6 +51,8 @@
...
@@ -51,6 +51,8 @@
<Button x:Name="Download" Content="Download" Click="Download_clicked" Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,10,10" Grid.Row="3" VerticalAlignment="Bottom" Width="75" Height="30"/>
<Button x:Name="Download" Content="Download" Click="Download_clicked" Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,10,10" Grid.Row="3" VerticalAlignment="Bottom" Width="75" Height="30"/>
<Button x:Name="CompileAndRun" Content="Compile and Run" Click="CompileAndRun_clicked" Grid.Column="1" Margin="0,0,170,10" Grid.Row="3" VerticalAlignment="Bottom" Width="101" Height="30" HorizontalAlignment="Right"/>
<Button x:Name="CompileAndRun" Content="Compile and Run" Click="CompileAndRun_clicked" Grid.Column="1" Margin="0,0,170,10" Grid.Row="3" VerticalAlignment="Bottom" Width="101" Height="30" HorizontalAlignment="Right"/>
<Button x:Name="Compile" Content="Compile" Click="Compile_clicked" Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,90,10" Grid.Row="3" VerticalAlignment="Bottom" Width="75" Height="30"/>
<Button x:Name="Compile" Content="Compile" Click="Compile_clicked" Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,90,10" Grid.Row="3" VerticalAlignment="Bottom" Width="75" Height="30"/>
<CheckBox x:Name="OnlyShowPrograms" Content="CheckBox" Click="OnlyShowPrograms_clicked" Grid.Column="1" HorizontalAlignment="Right" Height="15" Margin="0,10,10,0" VerticalAlignment="Top" Width="15"/>
<Label Content="Only show programs" Grid.Column="1" HorizontalAlignment="Right" Height="38" Margin="0,4,23,26" Width="137" RenderTransformOrigin="0.871,0.526" VerticalAlignment="Center" Grid.RowSpan="2"/>
</Grid>
</Grid>
</Window>
</Window>
EV3Explorer/MainWindow.xaml.cs
View file @
bb83a482
...
@@ -97,6 +97,7 @@ namespace EV3Explorer
...
@@ -97,6 +97,7 @@ namespace EV3Explorer
this
.
Width
=
settings
.
windowWidth
;
this
.
Width
=
settings
.
windowWidth
;
this
.
Height
=
settings
.
windowHeight
;
this
.
Height
=
settings
.
windowHeight
;
this
.
leftColumn
.
Width
=
new
GridLength
((
double
)
settings
.
splitterPosition
,
GridUnitType
.
Pixel
);
this
.
leftColumn
.
Width
=
new
GridLength
((
double
)
settings
.
splitterPosition
,
GridUnitType
.
Pixel
);
this
.
OnlyShowPrograms
.
IsChecked
=
settings
.
onlyShowPrograms
;
// retrieve initial data from brick
// retrieve initial data from brick
EV3Path
.
Text
=
ev3path
;
EV3Path
.
Text
=
ev3path
;
...
@@ -147,7 +148,8 @@ namespace EV3Explorer
...
@@ -147,7 +148,8 @@ namespace EV3Explorer
settings
.
windowWidth
=
(
int
)
Width
;
settings
.
windowWidth
=
(
int
)
Width
;
settings
.
windowHeight
=
(
int
)
Height
;
settings
.
windowHeight
=
(
int
)
Height
;
settings
.
splitterPosition
=
Convert
.
ToInt32
(
leftColumn
.
Width
.
Value
);
settings
.
splitterPosition
=
Convert
.
ToInt32
(
leftColumn
.
Width
.
Value
);
settings
.
localDirectory
=
pcdirectory
==
null
?
"Computer"
:
pcdirectory
.
FullName
;
settings
.
localDirectory
=
pcdirectory
==
null
?
"Computer"
:
pcdirectory
.
FullName
;
settings
.
onlyShowPrograms
=
(
bool
)
OnlyShowPrograms
.
IsChecked
;
settings
.
Save
();
settings
.
Save
();
}
}
...
@@ -490,6 +492,10 @@ namespace EV3Explorer
...
@@ -490,6 +492,10 @@ namespace EV3Explorer
CompileAndDownload
(
true
);
CompileAndDownload
(
true
);
}
}
private
void
OnlyShowPrograms_clicked
(
Object
sneder
,
EventArgs
e
)
{
RefreshPCList
(
true
);
}
private
void
CompileAndDownload
(
bool
run
)
private
void
CompileAndDownload
(
bool
run
)
...
@@ -624,7 +630,12 @@ namespace EV3Explorer
...
@@ -624,7 +630,12 @@ namespace EV3Explorer
{
{
if
(
info
is
FileInfo
)
if
(
info
is
FileInfo
)
{
{
PCDirectory
.
Items
.
Add
(
new
PCFile
((
FileInfo
)
info
));
PCFile
pcf
=
new
PCFile
((
FileInfo
)
info
);
if
(
pcf
.
IsCompileable
||
!((
bool
)
OnlyShowPrograms
.
IsChecked
))
{
PCDirectory
.
Items
.
Add
(
pcf
);
}
}
}
else
if
(
info
is
DirectoryInfo
)
else
if
(
info
is
DirectoryInfo
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment