private Dictionary <string, Dictionary <string, Button[]> > buttons; // Soft, Year - [but.Update, but.Uninstall, but.Locate] public MainForm() { InitializeComponent(); this.mainTabControl.Visible = false; // FILL THE DICTIONNARIES this.versions = new Dictionary <string, Dictionary <string, string> >(); this.versions["Max"] = new Dictionary <string, string>(); this.versions["Max"].Add("2019", "21"); this.versions["Max"].Add("2018", "20"); this.versions["Max"].Add("2017", "19"); this.versions["Max"].Add("2015", "17"); this.versions["Maya"] = new Dictionary <string, string>(); this.versions["Maya"].Add("2019", "20"); this.versions["Maya"].Add("2018", "19"); this.versions["Maya"].Add("2017", "18"); this.labels = new Dictionary <string, Dictionary <string, Label[]> >(); this.labels["Max"] = new Dictionary <string, Label[]>(); this.labels["Max"].Add("2019", new[] { this.label_Max19_Info, this.label_Max19_ExpDate }); this.labels["Max"].Add("2018", new[] { this.label_Max18_Info, this.label_Max18_ExpDate }); this.labels["Max"].Add("2017", new[] { this.label_Max17_Info, this.label_Max17_ExpDate }); this.labels["Max"].Add("2015", new[] { this.label_Max15_Info, this.label_Max15_ExpDate }); this.labels["Maya"] = new Dictionary <string, Label[]>(); this.labels["Maya"].Add("2019", new[] { this.label_Maya19_Info, this.label_Maya19_ExpDate }); this.labels["Maya"].Add("2018", new[] { this.label_Maya18_Info, this.label_Maya18_ExpDate }); this.labels["Maya"].Add("2017", new[] { this.label_Maya17_Info, this.label_Maya17_ExpDate }); this.buttons = new Dictionary <string, Dictionary <string, Button[]> >(); this.buttons["Max"] = new Dictionary <string, Button[]>(); this.buttons["Max"].Add("2019", new[] { this.button_Max19_Update, this.button_Max19_Delete, this.button_Max19_Locate }); this.buttons["Max"].Add("2018", new[] { this.button_Max18_Update, this.button_Max18_Delete, this.button_Max18_Locate }); this.buttons["Max"].Add("2017", new[] { this.button_Max17_Update, this.button_Max17_Delete, this.button_Max17_Locate }); this.buttons["Max"].Add("2015", new[] { this.button_Max15_Update, this.button_Max15_Delete, this.button_Max15_Locate }); this.buttons["Maya"] = new Dictionary <string, Button[]>(); this.buttons["Maya"].Add("2019", new[] { this.button_Maya19_Update, this.button_Maya19_Delete, this.button_Maya19_Locate }); this.buttons["Maya"].Add("2018", new[] { this.button_Maya18_Update, this.button_Maya18_Delete, this.button_Maya18_Locate }); this.buttons["Maya"].Add("2017", new[] { this.button_Maya17_Update, this.button_Maya17_Delete, this.button_Maya17_Locate }); this.log("---------- BABYLON.JS EXPORTERS TOOL STARTED ----------\n"); this.downloader = new Downloader(); this.downloader.form = this; this.checker = new SoftwareChecker(); this.checker.form = this; this.locations = new Dictionary <string, Dictionary <string, string> >(); this.checkInstall("Max"); this.checkInstall("Maya"); this.mainTabControl.Visible = true; }
private Dictionary <string, Dictionary <string, Button[]> > buttons; // Soft, Year - [but.Update, but.Uninstall, but.Locate] public MainForm() { InitializeComponent(); this.mainTabControl.Visible = false; // FILL THE DICTIONNARIES this.versions = new Dictionary <string, Dictionary <string, string> >(); this.versions["Max"] = new Dictionary <string, string>(); this.versions["Max"].Add("2019", "21"); this.versions["Max"].Add("2018", "20"); this.versions["Max"].Add("2017", "19"); this.versions["Max"].Add("2015", "17"); this.versions["Maya"] = new Dictionary <string, string>(); this.versions["Maya"].Add("2019", "20"); this.versions["Maya"].Add("2018", "19"); this.versions["Maya"].Add("2017", "18"); this.latestInstalled = new Dictionary <string, Dictionary <string, bool> >(); foreach (var dcc in this.versions.Keys) { this.latestInstalled[dcc] = new Dictionary <string, bool>(); foreach (var dccVersion in this.versions[dcc].Keys) { this.latestInstalled[dcc][dccVersion] = true; } } this.labels = new Dictionary <string, Dictionary <string, Label[]> >(); this.labels["Max"] = new Dictionary <string, Label[]>(); this.labels["Max"].Add("2019", new[] { this.label_Max19_Info, this.label_Max19_ExpDate }); this.labels["Max"].Add("2018", new[] { this.label_Max18_Info, this.label_Max18_ExpDate }); this.labels["Max"].Add("2017", new[] { this.label_Max17_Info, this.label_Max17_ExpDate }); this.labels["Max"].Add("2015", new[] { this.label_Max15_Info, this.label_Max15_ExpDate }); this.labels["Maya"] = new Dictionary <string, Label[]>(); this.labels["Maya"].Add("2019", new[] { this.label_Maya19_Info, this.label_Maya19_ExpDate }); this.labels["Maya"].Add("2018", new[] { this.label_Maya18_Info, this.label_Maya18_ExpDate }); this.labels["Maya"].Add("2017", new[] { this.label_Maya17_Info, this.label_Maya17_ExpDate }); this.buttons = new Dictionary <string, Dictionary <string, Button[]> >(); this.buttons["Max"] = new Dictionary <string, Button[]>(); this.buttons["Max"].Add("2019", new[] { this.button_Max19_Update, this.button_Max19_Delete, this.button_Max19_Locate }); this.buttons["Max"].Add("2018", new[] { this.button_Max18_Update, this.button_Max18_Delete, this.button_Max18_Locate }); this.buttons["Max"].Add("2017", new[] { this.button_Max17_Update, this.button_Max17_Delete, this.button_Max17_Locate }); this.buttons["Max"].Add("2015", new[] { this.button_Max15_Update, this.button_Max15_Delete, this.button_Max15_Locate }); this.buttons["Maya"] = new Dictionary <string, Button[]>(); this.buttons["Maya"].Add("2019", new[] { this.button_Maya19_Update, this.button_Maya19_Delete, this.button_Maya19_Locate }); this.buttons["Maya"].Add("2018", new[] { this.button_Maya18_Update, this.button_Maya18_Delete, this.button_Maya18_Locate }); this.buttons["Maya"].Add("2017", new[] { this.button_Maya17_Update, this.button_Maya17_Delete, this.button_Maya17_Locate }); this.log("---------- BABYLON.JS EXPORTERS TOOL STARTED ----------\n"); this.downloader = new Downloader(); this.downloader.form = this; this.checker = new SoftwareChecker(); this.checker.form = this; this.checker.setLatestVersionDate(); this.locations = new Dictionary <string, Dictionary <string, string> >(); this.checkInstall("Max"); this.checkInstall("Maya"); this.mainTabControl.Visible = true; if (!this.checker.ensureAdminMode()) { this.goTab(""); this.error("\nApplication is not running in Administrator mode.\nYou should restart the application to ensure its functionnalities.\n"); } }