protected override int Execute(ActionData data) { try { HeatCurve dialog = HeatCurve.Instance; if (dialog.WindowState == FormWindowState.Minimized) { dialog.WindowState = HeatCurveHelper.LastWindowState; } if (!dialog.Visible) { dialog.Show(AppManager.MainForm); } } catch (Exception ex) { AppExtension.PrintStackTrace(ex); } return(0); }
protected override int Execute(ActionData data) { RowValues.SelectedSolvisControlVersion = 131; OpenFileDialog dialog = new OpenFileDialog(); dialog.DefaultExt = "txt"; dialog.FileName = ""; string solvisFiles = "Solvis Files"; //@Language Resource ? if (RowValues.SolvisControlVersion < 132) { dialog.Filter = solvisFiles + " (so*.txt)|so*.txt|" + solvisFiles + " (mi*.txt)|mi*.txt"; } else { dialog.Filter = solvisFiles + " (mi*.txt)|mi*.txt|" + solvisFiles + " (so*.txt)|so*.txt"; } dialog.InitialDirectory = AppManager.ConfigManager.OpenDir; dialog.CheckFileExists = true; dialog.CheckPathExists = true; dialog.ReadOnlyChecked = true; dialog.Multiselect = true; if (dialog.ShowDialog(AppManager.MainForm) == DialogResult.OK) { AppManager.ConfigManager.OpenDir = Path.GetDirectoryName(dialog.FileName); string fileName = Path.GetFileNameWithoutExtension(dialog.FileName); if (fileName.StartsWith("MI", StringComparison.OrdinalIgnoreCase)) { RowValues.SelectedSolvisControlVersion = 132; } string[] names = dialog.FileNames; if (names.Length > 0) { Array.Sort(names); AppManager.SolvisFileManager.NewFileSelection(names); AppManager.DataManager.FillSolvisList(names[0]); } } return(0); }
protected override int Execute(ActionData data) { try { PrintingManager manager = AppManager.MainForm.ChartControl.ChartMain.Printing; manager.PrintDocument.DefaultPageSettings.Landscape = true; manager.PrintDocument.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(39, 39, 39, 39); PrintPreviewDialog dialog = new PrintPreviewDialog(); dialog.ClientSize = new Size(800, 600); dialog.Document = manager.PrintDocument; dialog.Icon = AppManager.IconManager.PrintPreviewIcon; dialog.ShowDialog(AppManager.MainForm); //manager.PrintPreview(); } catch (Exception ex) { AppExtension.PrintStackTrace(ex); } return(0); }
protected override int Execute(ActionData data) { try { ConfigManager manager = AppManager.ConfigManager; if (string.IsNullOrWhiteSpace(manager.SdCardDir)) { FolderBrowserDialog folder = new FolderBrowserDialog(); folder.Description = ConfigEditor.FolderDescription; folder.ShowNewFolderButton = false; if (folder.ShowDialog() == DialogResult.OK) { manager.SdCardDir = folder.SelectedPath; } else { return(0); } } AppManager.MainForm.Cursor = Cursors.WaitCursor; FileToInt32List timeTable = new FileToInt32List(manager.SdCardDir, "zeitplan.txt"); if (!timeTable.Empty) { TimeOverview dialog = new TimeOverview(); dialog.TimeTable = timeTable; dialog.SaveFormBitmap = manager.TimeTableBitmap; dialog.SuppressMask = (SuppressMask)manager.SDCardSuppressMask; dialog.ShowDialog(AppManager.MainForm); } } catch (Exception ex) { AppExtension.PrintStackTrace(ex); } finally { AppManager.MainForm.Cursor = Cursors.Default; } return(0); }
protected abstract int Execute(ActionData data);