public override void EndInit() { base.EndInit(); LoadEquipmentNotes(); AppModeNotifications.Subscribe(this); }
public RadarStatusPage() { InitializeComponent(); AppModeNotifications.Subscribe(this); LoadRadars(); }
public EquipmentStatusPageController() { InitializeComponent(); AppModeNotifications.Subscribe(this); LoadStatusPages(); }
public StatusBarControl() { InitializeComponent(); SetDateTime(); AppTimer.Subscribe(this, TimerInterval.Minutes); AppModeNotifications.Subscribe(this); }
private void InitializerCommonTasks() { InitializeComponent(); AppModeNotifications.Subscribe(this); SetMode(AppMode.Slide); adminEquipmentTextBox.GotFocus += AdminEquipmentTextBoxSelectAll; SetMenuItemTags(); }
public EquipmentGroup() { InitializeComponent(); var form = new NewGroupDialog(); form.ShowDialog(); slideHeader.Content = techHeader.Content = adminHeader.Text = form.GroupName; for (int i = 0; i < form.EquipmentCount; i++) { AddEquipmentClick(this, new RoutedEventArgs()); } AppModeNotifications.Subscribe(this); SetMode(AppMode.Admin); SetTags(); }
public MainWindow() { try { InitializeComponent(); savedPasswords = LoadPasswords(); AppModeNotifications.Subscribe(this); Events(); modeChangeNotifications.Broadcast(AppMode.Slide); } catch (Exception e) { var error = "Error Initializine Main Window"; ErrorLogger.ErrorDialog(error, ErrorType.Failure); ErrorLogger.LogError(error, e, Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Properties.Settings.Default.AppDataFolder + Properties.Settings.Default.ErrorLogFilename); Close(); } }
public EquipmentGroup(string groupName, StreamReader statusLines) { InitializeComponent(); try { slideHeader.Content = techHeader.Content = adminHeader.Text = groupName; var groupOptions = statusLines.ReadLine().Split(','); wrap = groupOptions[0].Contains("True"); horizontal = groupOptions[1].Contains("True"); PageGroup = groupOptions[2].Contains("True"); if (horizontal) { wrapGroupPanel.Orientation = Orientation.Horizontal; } else { wrapGroupPanel.Orientation = Orientation.Vertical; } string line; while (!(line = statusLines.ReadLine()).Equals("End Group")) { if (line.StartsWith("Start Group:")) { var group = new EquipmentGroup(line.Remove(0, 13), statusLines); group.EquipmentGroupDelete += GroupDelete; if (wrap) { wrapGroupPanel.Children.Add(group); } else { noWrapGroupPanel.Children.Add(group); } } else { var equipment = new Equipment(line.Remove(0, 17), statusLines); equipment.EquipmentDelete += EquipmentDelete; if (wrap) { wrapGroupPanel.Children.Add(equipment); } else { noWrapGroupPanel.Children.Add(equipment); } } } AppModeNotifications.Subscribe(this); SetMode(AppMode.Slide); SetTags(); }catch (OutOfMemoryException e) { var error = "Error Importing Equipment Group:\nAn Out of Memory Exception occured\nSee dump file"; ErrorLogger.ErrorDialog(error, ErrorType.Failure); ErrorLogger.LogError(error, e, Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Properties.Settings.Default.AppDataFolder + Properties.Settings.Default.ErrorLogFilename); } catch (IOException e) { var error = "Error Importing Equipment Group:\nAn IO Exception occured\nSee dump file"; ErrorLogger.ErrorDialog(error, ErrorType.Failure); ErrorLogger.LogError(error, e, Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Properties.Settings.Default.AppDataFolder + Properties.Settings.Default.ErrorLogFilename); } catch (Exception e) { var error = "Error Importing Equipment Group:\nAn Unknown Exception occured\nSee dump file"; ErrorLogger.ErrorDialog(error, ErrorType.Failure); ErrorLogger.LogError(error, e, Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Properties.Settings.Default.AppDataFolder + Properties.Settings.Default.ErrorLogFilename); } }