public override void BackPage() { if (Filters.Page > 0) { Filters.Page--; } NotifyRefresh?.Invoke(); }
public void GetMessageFromClient(object sender, string crea) { CommandRecievedEventArgs command = CommandRecievedEventArgs.FromJson(crea); if (command.CommandID == (int)CommandEnum.GetConfigCommand) { string m = command.Args[0]; JObject json = JObject.Parse(m); OutputDir = (string)json["OutputDir"]; string[] studs = ((string)json["Students"]).Split(';'); Students = new ObservableCollection <Student>(); foreach (string s in studs) { Students.Add(Student.fromString(s)); } NotifyRefresh?.Invoke(); } }
public void GetMessageFromClient(object sender, string message) { //If message if log - handle and notify, else ignore. CommandRecievedEventArgs command = CommandRecievedEventArgs.FromJson(message); if (command.CommandID == (int)CommandEnum.LogCommand) { ObservableCollection <LogType> list = new ObservableCollection <LogType>(); string[] logsStrings = command.Args[0].Split(';'); foreach (string s in logsStrings) { if (s.Contains("Status") && s.Contains("Message")) { try { MessageRecievedEventArgs m = MessageRecievedEventArgs.FromJson(s); list.Add(LogType.LogTypeFromMessageRecieved(m)); } catch (Exception e) { continue; } } } Logs = list; NotifyRefresh?.Invoke(); } else if (command.CommandID == (int)CommandEnum.NewLogEntryCommand) { try { MessageRecievedEventArgs m = MessageRecievedEventArgs.FromJson(command.Args[0]); ObservableCollection <LogType> tempList = new ObservableCollection <LogType>(Logs); tempList.Add(LogType.LogTypeFromMessageRecieved(m)); this.Logs = tempList; NotifyRefresh?.Invoke(); } catch (Exception e) { Console.WriteLine(e.ToString()); } } }
public void GetMessageFromClient(object sender, string crea) { CommandRecievedEventArgs command = CommandRecievedEventArgs.FromJson(crea); if (command.CommandID == (int)CommandEnum.RemovePhoto) { string thumbPath = command.Args[0]; if (ThumbnailsPath.Contains(thumbPath)) { ThumbnailsPath.Remove(thumbPath); foreach (PhotosInfo p in Photos) { if (p.ThumbPath.Equals(thumbPath)) { Photos.Remove(p); } } } NotifyRefresh?.Invoke(); } }
public void GetMessageFromClient(object sender, string crea) { Debug.WriteLine("recieved" + crea); CommandRecievedEventArgs command = CommandRecievedEventArgs.FromJson(crea); if (command.CommandID == (int)CommandEnum.GetConfigCommand) { string m = command.Args[0]; JObject json = JObject.Parse(m); OutputDir = (string)json["OutputDir"]; SourceName = (string)json["SourceName"]; ThumbnailSize = int.Parse((string)json["ThumbnailSize"]); LogName = (string)json["LogName"]; StudentsString = (string)json["Students"]; UpdateHandlersFromString((string)json["Handler"]); NotifyRefresh?.Invoke(); } else if (command.CommandID == (int)CommandEnum.CloseCommand) { UpdateHandlersFromString(command.Args[0]); NotifyRefresh?.Invoke(); } }
public LightStartForm(LoginForm tLoginForm) { InitializeComponent(); LoginForm = tLoginForm; TM = new TablesManager(); MaximumSize = Screen.PrimaryScreen.WorkingArea.Size; //CurrentTimeLabel.Text = DateTime.Now.ToString("HH:mm"); //CurrentDayOfWeekLabel.Text = DateTime.Now.ToString("dddd"); //CurrentDayMonthLabel.Text = DateTime.Now.ToString("dd MMMM"); AnimateTimer.Enabled = true; UserLabel.Text = Security.CurrentUserRName; //UpdatesPanel.Width = UserPanel.Left - UpdatesPanel.Left - 5; PhotoBox.Image = UserProfile.GetUserPhoto(); InfiniumStart = new Infinium.InfiniumStart(); InfiniumTilesContainer.ItemsDataTable = InfiniumStart.ModulesDataTable; InfiniumTilesContainer.MenuItemID = 0; InfiniumTilesContainer.InitializeItems(); ActiveNotifySystem = new Infinium.ActiveNotifySystem(); InfiniumNotifyList.ModulesDataTable = InfiniumStart.FullModulesDataTable; InfiniumStartMenu.ItemsDataTable = InfiniumStart.MenuItemsDataTable; InfiniumStartMenu.InitializeItems(); InfiniumStartMenu.Selected = 0; InfiniumMinimizeList.ModulesDataTable = InfiniumStart.FullModulesDataTable; if (InfiniumStart.ModulesDataTable.Select("MenuItemID = 0").Count() == 0) { InfiniumStartMenu.Selected = 1; } TopForm = null; if (TopForm != null) { OnLineControl.IamOnline(ActiveNotifySystem.GetModuleIDByForm(TopForm.Name), true); } else { OnLineControl.IamOnline(0, true); } OnLineControl.SetOffline(); NotifyRefreshT = new NotifyRefresh(FuckingNotify); OnlineFuck = new OnlineFuckingDelegate(GetTopMostAndModuleName); NotifyThread = new Thread(delegate() { NotifyCheck(); }); NotifyThread.Start(); while (!SplashForm.bCreated) { ; } }
public void Update() { NotifyRefresh?.Invoke(); }
public override void NextPage() { Filters.Page++; NotifyRefresh?.Invoke(); }