Merge pull request #1162 from larsbrubaker/master
Changed upload to sync
This commit is contained in:
commit
e2b10e08a2
6 changed files with 31 additions and 11 deletions
|
|
@ -46,7 +46,7 @@ namespace MatterHackers.MatterControl
|
||||||
List<CheckBox> checkBoxes = new List<CheckBox>();
|
List<CheckBox> checkBoxes = new List<CheckBox>();
|
||||||
|
|
||||||
public CopyGuestProfilesToUser(Action afterProfilesImported)
|
public CopyGuestProfilesToUser(Action afterProfilesImported)
|
||||||
: base("Cancel", "Select Printers to Upload")
|
: base("Cancel", "Select Printers to Sync")
|
||||||
{
|
{
|
||||||
var scrollWindow = new ScrollableWidget()
|
var scrollWindow = new ScrollableWidget()
|
||||||
{
|
{
|
||||||
|
|
@ -70,7 +70,7 @@ namespace MatterHackers.MatterControl
|
||||||
var guestProfileManager = ProfileManager.LoadGuestDB();
|
var guestProfileManager = ProfileManager.LoadGuestDB();
|
||||||
if (guestProfileManager?.Profiles.Count > 0)
|
if (guestProfileManager?.Profiles.Count > 0)
|
||||||
{
|
{
|
||||||
container.AddChild(new TextWidget("Printers to Upload:".Localize())
|
container.AddChild(new TextWidget("Printers to Sync:".Localize())
|
||||||
{
|
{
|
||||||
TextColor = ActiveTheme.Instance.PrimaryTextColor,
|
TextColor = ActiveTheme.Instance.PrimaryTextColor,
|
||||||
Margin = new BorderDouble(0, 3, 0, 15),
|
Margin = new BorderDouble(0, 3, 0, 15),
|
||||||
|
|
@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var uploadButton = textImageButtonFactory.Generate("Upload".Localize());
|
var uploadButton = textImageButtonFactory.Generate("Sync".Localize());
|
||||||
uploadButton.Click += (s, e) =>
|
uploadButton.Click += (s, e) =>
|
||||||
{
|
{
|
||||||
// do the import
|
// do the import
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ namespace MatterHackers.MatterControl
|
||||||
WizardWindow wizardWindow = GetWindow("PrinterSetup");
|
WizardWindow wizardWindow = GetWindow("PrinterSetup");
|
||||||
wizardWindow.Title = "Setup Wizard".Localize();
|
wizardWindow.Title = "Setup Wizard".Localize();
|
||||||
|
|
||||||
wizardWindow.ChangeToPage<SetupStepComPortOne>();
|
wizardWindow.ChangeToPage<SetupStepInstallDriver>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsOpen(string uri)
|
public static bool IsOpen(string uri)
|
||||||
|
|
|
||||||
|
|
@ -74,20 +74,22 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
}
|
}
|
||||||
|
|
||||||
SwitchToPrinterTheme(MatterControlApplication.IsLoading);
|
SwitchToPrinterTheme(MatterControlApplication.IsLoading);
|
||||||
if (!MatterControlApplication.IsLoading
|
if (!MatterControlApplication.IsLoading)
|
||||||
&& ActiveSliceSettings.Instance.PrinterSelected)
|
|
||||||
{
|
{
|
||||||
OnActivePrinterChanged(null);
|
OnActivePrinterChanged(null);
|
||||||
|
|
||||||
string[] comportNames = FrostedSerialPort.GetPortNames();
|
string[] comportNames = FrostedSerialPort.GetPortNames();
|
||||||
|
|
||||||
if (Instance.GetValue<bool>(SettingsKey.auto_connect))
|
if (ActiveSliceSettings.Instance.PrinterSelected)
|
||||||
{
|
{
|
||||||
UiThread.RunOnIdle(() =>
|
if (Instance.GetValue<bool>(SettingsKey.auto_connect))
|
||||||
{
|
{
|
||||||
|
UiThread.RunOnIdle(() =>
|
||||||
|
{
|
||||||
//PrinterConnectionAndCommunication.Instance.HaltConnectionThread();
|
//PrinterConnectionAndCommunication.Instance.HaltConnectionThread();
|
||||||
PrinterConnectionAndCommunication.Instance.ConnectToActivePrinter();
|
PrinterConnectionAndCommunication.Instance.ConnectToActivePrinter();
|
||||||
}, 2);
|
}, 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
BorderColor = new RGBA_Bytes(ActiveTheme.Instance.SecondaryTextColor, 100),
|
BorderColor = new RGBA_Bytes(ActiveTheme.Instance.SecondaryTextColor, 100),
|
||||||
BackgroundColor = new RGBA_Bytes(0, 0, 0, 0),
|
BackgroundColor = new RGBA_Bytes(0, 0, 0, 0),
|
||||||
BorderWidth = 1,
|
BorderWidth = 1,
|
||||||
|
MenuAsWideAsItems = false,
|
||||||
|
AlignToRightEdge = true,
|
||||||
};
|
};
|
||||||
sliceOptionsMenuDropList.VAnchor |= VAnchor.ParentCenter;
|
sliceOptionsMenuDropList.VAnchor |= VAnchor.ParentCenter;
|
||||||
sliceOptionsMenuDropList.SelectionChanged += new EventHandler(MenuDropList_SelectionChanged);
|
sliceOptionsMenuDropList.SelectionChanged += new EventHandler(MenuDropList_SelectionChanged);
|
||||||
|
|
@ -114,7 +116,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
{
|
{
|
||||||
{ "Import".Localize(), ImportSettingsMenu_Click },
|
{ "Import".Localize(), ImportSettingsMenu_Click },
|
||||||
{ "Export".Localize(), () => { WizardWindow.Show<ExportSettingsPage>("ExportSettingsPage", "Export Settings"); return true; } },
|
{ "Export".Localize(), () => { WizardWindow.Show<ExportSettingsPage>("ExportSettingsPage", "Export Settings"); return true; } },
|
||||||
{ "Printer History".Localize(), () => { WizardWindow.Show<PrinterProfileHistoryPage>("somecontext", "Hello world"); return true; } },
|
{ "Settings History".Localize(), () => { WizardWindow.Show<PrinterProfileHistoryPage>("somecontext", "Hello world"); return true; } },
|
||||||
{ "Reset to defaults".Localize(),() => { UiThread.RunOnIdle(ResetToDefaults); return true; } },
|
{ "Reset to defaults".Localize(),() => { UiThread.RunOnIdle(ResetToDefaults); return true; } },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
string categoryPageLabel = category.Name.Localize();
|
string categoryPageLabel = category.Name.Localize();
|
||||||
TabPage categoryPage = new TabPage(categoryPageLabel);
|
TabPage categoryPage = new TabPage(categoryPageLabel);
|
||||||
SimpleTextTabWidget textTabWidget = new SimpleTextTabWidget(categoryPage, category.Name + " Tab", 16,
|
SimpleTextTabWidget textTabWidget = new SimpleTextTabWidget(categoryPage, category.Name + " Tab", 16,
|
||||||
ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), ActiveTheme.Instance.TabLabelUnselected, new RGBA_Bytes());
|
ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), ActiveTheme.Instance.TabLabelUnselected, new RGBA_Bytes());
|
||||||
categoryPage.AnchorAll();
|
categoryPage.AnchorAll();
|
||||||
topCategoryTabs.AddTab(textTabWidget);
|
topCategoryTabs.AddTab(textTabWidget);
|
||||||
|
|
||||||
|
|
@ -694,6 +694,16 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
{
|
{
|
||||||
// This is a place holder type to allow us to put in the control that will allow the deletion of a printer profile
|
// This is a place holder type to allow us to put in the control that will allow the deletion of a printer profile
|
||||||
TextImageButtonFactory buttonFactory = new TextImageButtonFactory();
|
TextImageButtonFactory buttonFactory = new TextImageButtonFactory();
|
||||||
|
buttonFactory.borderWidth = 1;
|
||||||
|
if (ActiveTheme.Instance.IsDarkTheme)
|
||||||
|
{
|
||||||
|
buttonFactory.normalBorderColor = new RGBA_Bytes(99, 99, 99);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buttonFactory.normalBorderColor = new RGBA_Bytes(140, 140, 140);
|
||||||
|
}
|
||||||
|
|
||||||
buttonFactory.normalTextColor = RGBA_Bytes.Red;
|
buttonFactory.normalTextColor = RGBA_Bytes.Red;
|
||||||
var button = buttonFactory.Generate("Delete Printer".Localize());
|
var button = buttonFactory.Generate("Delete Printer".Localize());
|
||||||
button.HAnchor = HAnchor.ParentCenter;
|
button.HAnchor = HAnchor.ParentCenter;
|
||||||
|
|
|
||||||
|
|
@ -5257,3 +5257,9 @@ Translated:The profile you are attempting to load has been corrupted. We loaded
|
||||||
English:Recovered printer profile
|
English:Recovered printer profile
|
||||||
Translated:Recovered printer profile
|
Translated:Recovered printer profile
|
||||||
|
|
||||||
|
English:Sorry! Looks like an account already exists for that email address.
|
||||||
|
Translated:Sorry! Looks like an account already exists for that email address.
|
||||||
|
|
||||||
|
English:Settings History
|
||||||
|
Translated:Settings History
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue