public StartTask(Main mainWin, HistoryControl history) { InitializeComponent(); hotForm = mainWin; historyForm = history; loadConfig(); }
private void UITestForm_Load(object sender, EventArgs e) { testWelcomeControl = new WelcomeControl(); testWelcomeControl.Dock = DockStyle.Fill; testLocationControl = new LocationControl(); testLocationControl.Dock = DockStyle.Fill; testTeamControl = new TeamControl(); testTeamControl.Dock = DockStyle.Fill; testStructureControl = new StructureControl(); testStructureControl.Dock = DockStyle.Fill; testHistoryControl = new HistoryControl(); testHistoryControl.Dock = DockStyle.Fill; testMethodologyControl = new MethodologyControl(); testMethodologyControl.Dock = DockStyle.Fill; activeControlPanel.Controls.Add(testWelcomeControl); welcomeTabButton.BackColor = Color.DarkGray; progress = 1; this.data = new Data.Unit(); }
public QueueForm() { InitializeComponent(); panel.AutoScroll = false; panel.HorizontalScroll.Enabled = false; panel.HorizontalScroll.Visible = false; panel.HorizontalScroll.Maximum = 0; panel.AutoScroll = true; orderControls = new List <OrderControl>(); orderForm = new AddOrderForm(); orderForm.AddOrderCallback = new AddNewOrderDelegate(HandleNewOrder); secondForm = new SecondForm.SecondForm(); secondForm.Show(); mainGroupBox = gbMain; historyControl = new HistoryControl(); sellsBookControl = new SellsBookControl(); cashBookControl = new CashBookControl(); costsControl = new CostsControl(); currentGroupBox = mainGroupBox; }
private void ListViewMenu_SelectionChanged(object sender, SelectionChangedEventArgs e) { System.Windows.Controls.UserControl usc; GridMain.Children.Clear(); switch (((ListViewItem)((ListView)sender).SelectedItem).Name) { case "ItemHome": usc = new DashboardControl(_employee); GridMain.Children.Add(usc); break; case "ItemHistory": usc = new HistoryControl(_employee); GridMain.Children.Add(usc); break; } }
/// <summary> /// コンストラクタ /// </summary> public MainForm() { InitializeComponent(); this.textBox1.AllowDrop = true; this.textBox1.DragDrop += this.MainForm_DragDrop; this.textBox1.DragEnter += this.MainForm_DragEnter; // フォントの自動変更を防止する this.textBox1.LanguageOption = RichTextBoxLanguageOptions.UIFonts; // 履歴管理クラス this.historyCntrol = new HistoryControl(this); // 設定ファイルの読み込み this.loadSetting(Setting.LoadSetting()); // 初期化処理 this.initControl(); }
private void MenuItem_Click_3(object sender, RoutedEventArgs e) { MapView.Visibility = MapView.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible; HistoryControl.Visibility = HistoryControl.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible; HistoryControl.HistoryButton_Click(); }
private void InitializeHistory() { var hasDamage = this.ParseControl.Timeline.Overall.Stats.GetStatValue("TotalOverallDamage") > 0; var hasHealing = this.ParseControl.Timeline.Overall.Stats.GetStatValue("TotalOverallHealing") > 0; var hasDamageTaken = this.ParseControl.Timeline.Overall.Stats.GetStatValue("TotalOverallDamageTaken") > 0; if (hasDamage || hasHealing || hasDamageTaken) { StatContainer currentOverallStats = this.ParseControl.Timeline.Overall.Stats; var historyItem = new ParseHistoryItem(); HistoryControl historyController = historyItem.HistoryControl = new HistoryControl(); foreach (Stat <double> stat in currentOverallStats) { historyController.Timeline.Overall.Stats.EnsureStatValue(stat.Name, stat.Value); } historyController.Timeline.Overall.Stats.EnsureStatValue("StaticPlayerDPS", currentOverallStats.GetStatValue("DPS")); historyController.Timeline.Overall.Stats.EnsureStatValue("StaticPlayerDOTPS", currentOverallStats.GetStatValue("DOTPS")); historyController.Timeline.Overall.Stats.EnsureStatValue("StaticPlayerHPS", currentOverallStats.GetStatValue("HPS")); historyController.Timeline.Overall.Stats.EnsureStatValue("StaticPlayerHOHPS", currentOverallStats.GetStatValue("HOHPS")); historyController.Timeline.Overall.Stats.EnsureStatValue("StaticPlayerHOTPS", currentOverallStats.GetStatValue("HOTPS")); historyController.Timeline.Overall.Stats.EnsureStatValue("StaticPlayerHMPS", currentOverallStats.GetStatValue("HMPS")); historyController.Timeline.Overall.Stats.EnsureStatValue("StaticPlayerDTPS", currentOverallStats.GetStatValue("DTPS")); historyController.Timeline.Overall.Stats.EnsureStatValue("StaticPlayerDTOTPS", currentOverallStats.GetStatValue("DTOTPS")); StatGroup[] playerList = this.ParseControl.Timeline.Party.ToArray(); foreach (StatGroup player in playerList) { HistoryGroup playerInstance = historyController.Timeline.GetSetPlayer(player.Name); playerInstance.Last20DamageActions = ((Player)player).Last20DamageActions.ToList(); playerInstance.Last20DamageTakenActions = ((Player)player).Last20DamageTakenActions.ToList(); playerInstance.Last20HealingActions = ((Player)player).Last20HealingActions.ToList(); playerInstance.Last20Items = ((Player)player).Last20Items.ToList(); foreach (Stat <double> stat in player.Stats) { playerInstance.Stats.EnsureStatValue(stat.Name, stat.Value); } this.RabbitHoleCopy(ref playerInstance, player); } StatGroup[] monsterList = this.ParseControl.Timeline.Monster.ToArray(); foreach (StatGroup monster in monsterList) { HistoryGroup monsterInstance = historyController.Timeline.GetSetMonster(monster.Name); monsterInstance.Last20DamageActions = ((Monster)monster).Last20DamageActions.ToList(); monsterInstance.Last20DamageTakenActions = ((Monster)monster).Last20DamageTakenActions.ToList(); monsterInstance.Last20HealingActions = ((Monster)monster).Last20HealingActions.ToList(); monsterInstance.Last20Items = ((Monster)monster).Last20Items.ToList(); foreach (Stat <double> stat in monster.Stats) { monsterInstance.Stats.EnsureStatValue(stat.Name, stat.Value); } this.RabbitHoleCopy(ref monsterInstance, monster); } historyItem.Start = this.ParseControl.StartTime; historyItem.End = DateTime.Now; historyItem.ParseLength = historyItem.End - historyItem.Start; var parseTimeDetails = $"{historyItem.Start} -> {historyItem.End} [{historyItem.ParseLength}]"; var zone = "UNKNOWN"; if (XIVInfoViewModel.Instance.CurrentUser != null) { var mapIndex = XIVInfoViewModel.Instance.CurrentUser.MapIndex; MapItem mapItem = ZoneLookup.GetZoneInfo(mapIndex); switch (Constants.GameLanguage) { case "French": zone = mapItem.Name.French; break; case "Japanese": zone = mapItem.Name.Japanese; break; case "German": zone = mapItem.Name.German; break; case "Chinese": zone = mapItem.Name.Chinese; break; case "Korean": zone = mapItem.Name.Korean; break; default: zone = mapItem.Name.English; break; } } var monsterName = "NULL"; try { StatGroup biggestMonster = null; foreach (StatGroup monster in this.ParseControl.Timeline.Monster) { if (biggestMonster == null) { biggestMonster = monster; } else { if (monster.Stats.GetStatValue("TotalOverallDamage") > biggestMonster.Stats.GetStatValue("TotalOverallDamage")) { biggestMonster = monster; } } } if (biggestMonster != null) { monsterName = biggestMonster.Name; } } catch (Exception ex) { Logging.Log(Logger, new LogItem(ex, true)); } foreach (Stat <double> oStat in currentOverallStats) { historyController.Timeline.Overall.Stats.EnsureStatValue(oStat.Name, oStat.Value); } historyItem.Name = $"{zone} [{monsterName}] {parseTimeDetails}"; DispatcherHelper.Invoke(() => MainViewModel.Instance.ParseHistory.Insert(1, historyItem)); } }
public static void ConvertJson(string fileName, string json) { JObject jsonHistoryItem = JObject.Parse(json); Dictionary <string, JToken> timeline = GetDictionary(jsonHistoryItem["Timeline"]); Dictionary <string, JToken> overall = GetDictionary(timeline["Overall"]); Dictionary <string, JToken> overallStats = GetDictionary(overall["Stats"]); var historyItem = new ParseHistoryItem(); HistoryControl historyController = historyItem.HistoryControl = new HistoryControl(); foreach (KeyValuePair <string, JToken> stat in overallStats) { historyController.Timeline.Overall.Stats.EnsureStatValue(stat.Key, (double)stat.Value); } Dictionary <string, JToken> players = GetDictionary(timeline["Party"]); foreach (KeyValuePair <string, JToken> player in players) { Dictionary <string, JToken> children = GetDictionary(player.Value); HistoryGroup playerInstance = historyController.Timeline.GetSetPlayer(player.Key); playerInstance.Last20DamageActions = children["Last20DamageActions"].ToObject <List <LineHistory> >(); playerInstance.Last20DamageTakenActions = children["Last20DamageTakenActions"].ToObject <List <LineHistory> >(); playerInstance.Last20HealingActions = children["Last20HealingActions"].ToObject <List <LineHistory> >(); playerInstance.Last20Items = children["Last20Items"].ToObject <List <LineHistory> >(); Dictionary <string, JToken> stats = GetDictionary(player.Value["Stats"]); foreach (KeyValuePair <string, JToken> stat in stats) { playerInstance.Stats.EnsureStatValue(stat.Key, (double)stat.Value); } RabbitHoleCopy(ref playerInstance, player); } Dictionary <string, JToken> monsters = GetDictionary(timeline["Monster"]); foreach (KeyValuePair <string, JToken> monster in monsters) { Dictionary <string, JToken> children = GetDictionary(monster.Value); HistoryGroup monsterInstance = historyController.Timeline.GetSetMonster(monster.Key); monsterInstance.Last20DamageActions = children["Last20DamageActions"].ToObject <List <LineHistory> >(); monsterInstance.Last20DamageTakenActions = children["Last20DamageTakenActions"].ToObject <List <LineHistory> >(); monsterInstance.Last20HealingActions = children["Last20HealingActions"].ToObject <List <LineHistory> >(); monsterInstance.Last20Items = children["Last20Items"].ToObject <List <LineHistory> >(); Dictionary <string, JToken> stats = GetDictionary(monster.Value["Stats"]); foreach (KeyValuePair <string, JToken> stat in stats) { monsterInstance.Stats.EnsureStatValue(stat.Key, (double)stat.Value); } RabbitHoleCopy(ref monsterInstance, monster); } Match fileNameParts = FileNameRegEx.Match(Path.GetFileNameWithoutExtension(fileName)); historyItem.Start = DateTime.Now; historyItem.End = DateTime.Now; var zone = "Unknown"; var monsterName = "NULL"; try { historyItem.Start = DateTime.Parse(fileNameParts.Groups["startTime"].ToString().Replace("_", ":")); historyItem.End = DateTime.Parse(fileNameParts.Groups["endTime"].ToString().Replace("_", ":")); } catch (Exception ex) { Logging.Log(Logger, new LogItem(ex, true)); } try { zone = fileNameParts.Groups["zone"].ToString(); monsterName = fileNameParts.Groups["monsterName"].ToString(); } catch (Exception ex) { Logging.Log(Logger, new LogItem(ex, true)); } historyItem.ParseLength = historyItem.End - historyItem.Start; var parseTimeDetails = $"{historyItem.Start} -> {historyItem.End} [{historyItem.ParseLength}]"; historyItem.Name = $"{zone} [{monsterName}] {parseTimeDetails}"; DispatcherHelper.Invoke(() => MainViewModel.Instance.ParseHistory.Insert(1, historyItem)); }