public bool ReportItemSettingsDialog(AppSettings settings, string name, string desc, bool useCustomIcon, GizmoComputerHardwareIconsEnum customIcon, TreeItem root, ReportSettings reportSettings)
        {
            ReportDialog dialog = new ReportDialog(settings, name, desc, useCustomIcon, customIcon, root, reportSettings);

            switch (dialog.ShowDialog())
            {
            case true:
                Name           = (dialog.DataContext as ReportItemSettingsViewModel).ReportName;
                Description    = (dialog.DataContext as ReportItemSettingsViewModel).ReportDescription;
                UseCustomIcon  = (dialog.DataContext as ReportItemSettingsViewModel).UseCustomIcon;
                CustomIcon     = (dialog.DataContext as ReportItemSettingsViewModel).CustomIcon;
                ReportSettings = new ReportSettings()
                {
                    ReportSourceContainerId = (dialog.DataContext as ReportItemSettingsViewModel).SelectedContainer.Id,
                    ReportTimeStamp         = DateTime.Now,
                    Columns                 = (dialog.DataContext as ReportItemSettingsViewModel).Columns,
                    ReportType              = (ReportTypeEnum)(dialog.DataContext as ReportItemSettingsViewModel).SelectedReportTypeItem.Value,
                    ComponentItem           = (ComponentTypeEnum)(dialog.DataContext as ReportItemSettingsViewModel).SelectedComponentItem.Value,
                    EachValueIsASepareteRow = (dialog.DataContext as ReportItemSettingsViewModel).EachValueIsASepareteRow
                };
                return(true);

            default:
                return(false);
            }
        }
Пример #2
0
        private void MenuItem_Click_1(object sender, RoutedEventArgs e)
        {
            SelectAccDialog acc = new SelectAccDialog();

            acc.ShowDialog();
            if (acc.DialogResult.HasValue && acc.DialogResult.Value)
            {
                ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();
                reportMenuProvider.ShowDialog();
                if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
                {
                    var oldacc  = Entrence.Mask.CreditAcc;
                    var oldaccd = Entrence.Mask.DebitAcc;
                    Entrence.Mask.CreditAcc = null;
                    Entrence.Mask.DebitAcc  = null;
                    Entrence.Mask.FromDate  = reportMenuProvider.Vm.FromDate();
                    Entrence.Mask.ToDate    = reportMenuProvider.Vm.ToDate();
                    ReportDialog rd = new ReportDialog(new AnaliticRegisterViewModel {
                        FromDate = reportMenuProvider.Vm.FromDate(), ToDate = reportMenuProvider.Vm.ToDate(), AccShortName = acc.Acc, ItemsDebit = acc.ItemsDebit
                    });
                    rd.ShowDialog();
                    Entrence.Mask.CreditAcc = oldacc;
                    Entrence.Mask.DebitAcc  = oldaccd;
                }
            }
        }
        public async Task Create()
        {
            meetingNotes = new MeetingNotes
            {
                Subject      = "Sub",
                Secretary    = "Secret",
                Date         = DateTime.Today,
                Participants = new List <Participant>
                {
                    new Participant {
                        Name = "Part 1"
                    }
                },
                Decisions = new List <Decision>
                {
                    new Decision {
                        Solution    = "Solution 0",
                        Problem     = "Problem 0",
                        Responsible = "Responsible 0",
                        ControlDate = DateTime.Today.AddDays(2)
                    }
                }
            };
            var dialog = new ReportDialog(meetingNotes);
            var result = await dialog.ShowDialog <MeetingNotes>(mainWindow);

            if (result != null)
            {
                meetingNotes = result;
            }
        }
Пример #4
0
        private void MenuItem_Click_6(object sender, RoutedEventArgs e)
        {
            SelectTrueContDialog acc = new SelectTrueContDialog();

            acc.ShowDialog();
            if (acc.DialogResult.HasValue && acc.DialogResult.Value)
            {
                SelectAccDialog acc1 = new SelectAccDialog();
                acc1.ShowDialog();
                if (acc1.DialogResult.HasValue && acc1.DialogResult.Value)
                {
                    ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();
                    reportMenuProvider.ShowDialog();
                    if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
                    {
                        var oldacc  = Entrence.Mask.CreditAcc;
                        var oldaccd = Entrence.Mask.DebitAcc;
                        Entrence.Mask.CreditAcc = null;
                        Entrence.Mask.DebitAcc  = null;
                        Entrence.Mask.FromDate  = reportMenuProvider.Vm.FromDate();
                        Entrence.Mask.ToDate    = reportMenuProvider.Vm.ToDate();
                        ReportDialog rd = new ReportDialog(new AnaliticRegisterViewModelTrueContr {
                            FromDate = reportMenuProvider.Vm.FromDate(), ToDate = reportMenuProvider.Vm.ToDate(), ItemsDebit = acc.ItemsDebit, CurrenAcc = acc1.CurrentAcc, Title = (sender as MenuItem).Tag.ToString()
                        });
                        rd.ShowDialog();
                        Entrence.Mask.CreditAcc = oldacc;
                        Entrence.Mask.DebitAcc  = oldaccd;
                    }
                }
            }
        }
Пример #5
0
        private void MenuItem_Click_4(object sender, RoutedEventArgs e)
        {
            ChoiserValutaandAcc acc = new ChoiserValutaandAcc();

            acc.ShowDialog();
            if (acc.DialogResult.HasValue && acc.DialogResult.Value)
            {
                //Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
                ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();
                reportMenuProvider.ShowDialog();
                if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
                {
                    var oldacc  = Entrence.Mask.CreditAcc;
                    var oldaccd = Entrence.Mask.DebitAcc;
                    Entrence.Mask.CreditAcc = null;
                    Entrence.Mask.DebitAcc  = null;
                    Entrence.Mask.FromDate  = reportMenuProvider.Vm.FromDate();
                    Entrence.Mask.ToDate    = reportMenuProvider.Vm.ToDate();
                    ReportDialog rd = new ReportDialog(new ValutaExtendedDialog {
                        FromDate = reportMenuProvider.Vm.FromDate(), ToDate = reportMenuProvider.Vm.ToDate(), AccShortName = acc.Acc, VidVal = acc.VidV, CodeClient = acc.CodeClient, Client = acc.Client, Title = (sender as MenuItem).Tag.ToString()
                    });
                    Entrence.Mask.CreditAcc = oldacc;
                    Entrence.Mask.DebitAcc  = oldaccd;
                    rd.ShowDialog();
                }

                //Mouse.OverrideCursor = System.Windows.Input.Cursors.Arrow;
            }
        }
        public bool ReportItemSettingsDialog(AppSettings settings, TreeItem root)
        {
            ReportDialog dialog = new ReportDialog(settings, root);

            switch (dialog.ShowDialog())
            {
            case true:
                Name           = (dialog.DataContext as ReportItemSettingsViewModel).ReportName;
                Description    = (dialog.DataContext as ReportItemSettingsViewModel).ReportDescription;
                UseCustomIcon  = (dialog.DataContext as ReportItemSettingsViewModel).UseCustomIcon;
                CustomIcon     = (dialog.DataContext as ReportItemSettingsViewModel).CustomIcon;
                ReportSettings = new ReportSettings()
                {
                    ReportSourceContainerId = (dialog.DataContext as ReportItemSettingsViewModel).SelectedContainer != null ? (dialog.DataContext as ReportItemSettingsViewModel).SelectedContainer.Id : new Guid(),
                    ReportTimeStamp         = DateTime.Now,
                    Columns                 = (dialog.DataContext as ReportItemSettingsViewModel).Columns,
                    ReportType              = (ReportTypeEnum)(dialog.DataContext as ReportItemSettingsViewModel).SelectedReportTypeItem.Value,
                    ComponentItem           = (ComponentTypeEnum)(dialog.DataContext as ReportItemSettingsViewModel).SelectedComponentItem.Value,
                    EachValueIsASepareteRow = (dialog.DataContext as ReportItemSettingsViewModel).EachValueIsASepareteRow
                };
                return(true);

            default:
                return(false);
            }
        }
Пример #7
0
        protected override void Add()
        {
            ReportDialog report = new ReportDialog(new DdsViewModel(new DdsDnevnikModel {
                KindActivity = 1, Title = "Дневник покупки", Month = Month, Year = Year
            }));

            report.ShowDialog();
        }
Пример #8
0
 private void AddReport_Click(object sender, RoutedEventArgs e)
 {
     ReportDialog reportDialog = new ReportDialog();
     bool?        response     = reportDialog.ShowDialog();
     //if (response == true)
     //{
     //    this.GetItems();
     //}
 }
Пример #9
0
        private void ReportLinkClick(jQueryEvent e)
        {
            e.PreventDefault();

            var dialog = new ReportDialog(new ReportDialogOptions
            {
                ReportKey = J(e.Target).GetDataValue("key").As<string>()
            });
        }
        public async Task Open()
        {
            var dialog = new ReportDialog(meetingNotes);
            var result = await dialog.ShowDialog <MeetingNotes>(mainWindow);

            if (result != null)
            {
                meetingNotes = result;
            }
        }
Пример #11
0
        protected override void Delete()
        {
            //AllConto =
            //   new ObservableCollection<Conto>(Context.GetAllContoWithoutDds(ConfigTempoSinglenton.GetInstance().CurrentFirma.Id, Entrence.Mask,1));

            //RefreshConto(AllConto);
            TypeRep = 2;
            var rd = new ReportDialog(this);

            rd.ShowDialog();
        }
        void ShowBill(Receipt overdueReceipt)
        {
            if (overdueReceipt == null)
            {
                return;
            }
#if !SL //TODO
            XtraReport report = new LatefeeReceipt(overdueReceipt);
            ReportDialog.ShowPrintDialog(report);
#endif
        }
Пример #13
0
        private void MenuItem_OnClick(object sender, RoutedEventArgs e)
        {
            ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();

            reportMenuProvider.ShowDialog();
            if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
            {
                var sm = new SearchViewModelWithAcc();
                sm.Tipdnev             = 1;
                Entrence.Mask.FromDate = reportMenuProvider.Vm.FromDate();
                Entrence.Mask.ToDate   = reportMenuProvider.Vm.ToDate();
                ReportDialog rmDialog = new ReportDialog(sm);
                rmDialog.Title = (sender as MenuItem).Tag.ToString();
                rmDialog.ShowDialog();
            }
        }
Пример #14
0
        private void showInReportDialogue(string s)
        {
            var dialog = new ReportDialog("Results")
            {
                textBox_Results =
                {
                    Text                          = s,
                    HorizontalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Disabled,
                    VerticalScrollBarVisibility   = System.Windows.Controls.ScrollBarVisibility.Auto
                },

                Owner = GetWindow(this)
            };

            dialog.Show();
        }
Пример #15
0
 public static void GenerateDdsSales(DateTime from, DateTime to, bool withdialog)
 {
     if (withdialog)
     {
         ReportManagerViewModel report = new ReportManagerViewModel(new DdsViewModel(new DdsDnevnikModel {
             KindActivity = 2, Title = "Дневник продажби", Month = from.Month, Year = from.Year, FromDate = from, ToDate = to
         }));
         report.StartTxt(null, null);
     }
     else
     {
         ReportDialog rd = new ReportDialog(new DdsViewModel(new DdsDnevnikModel {
             KindActivity = 2, Title = "Дневник продажби", Month = from.Month, Year = from.Year, FromDate = from, ToDate = to
         }));
         rd.ShowDialog();
     }
 }
Пример #16
0
 public static void GenerateDdsSales(int month, int year, bool withdialog)
 {
     if (withdialog)
     {
         ReportManagerViewModel report = new ReportManagerViewModel(new DdsViewModel(new DdsDnevnikModel {
             KindActivity = 2, Title = "Дневник продажби", Month = month, Year = year, FromDate = new DateTime(year, month, 1), ToDate = new DateTime(year, month, GetEndDate(month, year))
         }));
         report.AddNewCommand.Execute(null);
     }
     else
     {
         ReportDialog rd = new ReportDialog(new DdsViewModel(new DdsDnevnikModel {
             KindActivity = 2, Title = "Дневник продажби", Month = month, Year = year, FromDate = new DateTime(year, month, 1), ToDate = new DateTime(year, month, GetEndDate(month, year))
         }));
         rd.ShowDialog();
     }
 }
Пример #17
0
        private static void OnShowCommandLine(object parameter)
        {
            var programDescription = GetProgramDescription(parameter);

            if (CanLaunch(programDescription))
            {
                var title   = string.Format(Resources.Strings.ShowJzIntvCommandLineCommand_DialogTitle_Format, programDescription.Name);
                var message = string.Format(Resources.Strings.ShowJzIntvCommandLineCommand_DialogMessage_Format, programDescription.Name);
                var dialog  = ReportDialog.Create(title, message);
                dialog.ShowSendEmailButton = false;
                var options     = GetCommandLineOptionsForRom(programDescription);
                var jzIntvPath  = ConfigurationCommandGroup.ResolvePathSetting(JzIntvLauncherConfiguration.Instance.EmulatorPath);
                var commandLine = jzIntvPath + ' ' + options.BuildCommandLineArguments(programDescription.Rom.RomPath, false);
                dialog.ReportText = string.Format(Resources.Strings.ShowJzIntvCommandLineCommand_CommandLineMessage_Format, programDescription.Name, commandLine);
                dialog.ShowDialog(Resources.Strings.ReportErrorDialogButtonText);
            }
        }
Пример #18
0
        private void MenuItem_Grouping(object sender, RoutedEventArgs e)
        {
            SelectAccDialog acc = new SelectAccDialog();

            acc.ShowDialog();
            if (acc.DialogResult.HasValue && acc.DialogResult.Value)
            {
                ReportMenuProviderView reportMenuProvider = new ReportMenuProviderView();
                reportMenuProvider.ShowDialog();
                if (reportMenuProvider.DialogResult.HasValue && reportMenuProvider.DialogResult.Value)
                {
                    ReportDialog rd = new ReportDialog(new AnaliticRegisterViewModelContrGrupaDocument {
                        FromDate = reportMenuProvider.Vm.FromDate(), ToDate = reportMenuProvider.Vm.ToDate(), CurrenAcc = acc.CurrentAcc, ItemsDebit = acc.ItemsDebit, Title = (sender as MenuItem).Tag.ToString()
                    });
                    rd.ShowDialog();
                }
            }
        }
        //--------------------------------------------------------------------------
        public void InsertDocuments()
        {
            OpenFileDialog documentFilesPicker = new OpenFileDialog();

            documentFilesPicker.Title            = "Select document files";
            documentFilesPicker.Multiselect      = true;
            documentFilesPicker.Filter           = "txt files (*.txt)|*.txt";
            documentFilesPicker.FilterIndex      = 1;
            documentFilesPicker.RestoreDirectory = true;

            if (documentFilesPicker.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            // start loading
            _documentsLoader =
                new DocumentsLoader(documentFilesPicker.FileNames, _businessLogic);
            if (!_documentsLoader.HasDocumentToProcess)
            {
                return;
            }

            if (!_documentsLoader.Load(_businessLogic))
            {
                System.Windows.Forms.MessageBox.Show(
                    "Failed loading ALL documents!", "Error");
                return;
            }

            _currentLoadingScreen = new LoadingScreenDialog(
                "Loading documents ...", true);
            _currentLoadingScreen.ShowDialog();

            // show report
            ReportDialog report = new ReportDialog(_documentsLoader.DocumentsStatus);

            report.ShowDialog();
        }
Пример #20
0
        private void BtnShowReport_Click(object sender, EventArgs e)
        {
            Expense checkDate;

            using (var db = new ExpenseManager())
            {
                checkDate = (from a in db.GetAllItems()
                             where a.Date.Month == selectedMonth && a.Date.Year == selectedYear
                             select a).FirstOrDefault();
            }

            if (checkDate != null)
            {
                var dialog = ReportDialog.NewInstance(selectedMonth, selectedYear);
                dialog.DialogClosed += OnDialogClosed;
                dialog.Show(FragmentManager, "dialog");
            }
            else
            {
                Toast.MakeText(this.Activity, string.Format
                                   ("Brak wpisów w tym miesiącu"),
                               ToastLength.Short).Show();
            }
        }
 private async void reportButton_Click(object sender, RoutedEventArgs e)
 {
     ReportDialog        report  = new ReportDialog(bakkal.Id);
     ContentDialogResult content = await report.ShowAsync();
 }
Пример #22
0
        protected override void Report()
        {
            var rd = new ReportDialog(this);

            rd.ShowDialog();
        }
Пример #23
0
        protected override void Report()
        {
            ReportDialog report = new ReportDialog(this);

            report.ShowDialog();
        }
Пример #24
0
        private void help_button_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new ReportDialog("About")
            {
                textBox_Results =
                {
                    Text                          = @"Welcome to osu!ReplayAnalyzer.
This program is intended to analyze osu! replays and output relevant information, mostly targeted at witchhunter.
The provided information can be used to determine the probability of legitness of a player.

The first thing you want to do after downloading and launching the app is Open osuDB, this will load your osu!beatmaps into the program.
You'll only need to specify the path once, the program is going to remember the settings in a file and will load the DB automatically on startup next time.

Terms explained:
1. Pixel perfect hit is a hit done on the edge on the note rather than its center.
Originally, pixel perfect hits happened often when a player using relax was late on hitting a note.
Strictly, pixel perfect hits are only the ones that are PERFECTLY on the edge.
However, the term is generalized by measure of so-called perfectness for every hit.
Mathematically it is the distance between the cursor and the center of the note divided by the radius of the note.
It is a value from 0 (perfectly centered note hit) to 1 (pixel perfect edge note hit). Values more than 1 consequently correspond to so-called attempted hits, which are technically misses.
High number of pixel perfect hits indicates poor aim and probably usage of relax hack.

2. Over-aim is a hit which happened after the cursor hovered the note, left it and then hovered again.
This is also an indicator of poor aim, FCing maps with such inconsistency is fairly hard, so a high number of such moments across the replays of a certain player would suggest that they're relaxing.

3. Cursor teleport is a large cursor movement within a single frame which has no derivative.
This is equivalent to your intuitive definition of a teleport.
Even though cursor teleports happen often for tablet users due to mapping nature of the input, sometimes inverstigating cursor teleports allows to detect replay bots or maybe even aim assist.

4. Fast single tap is an inhumanly fast sequence of performed single tap hits.
This detects cases when a poor-coded relax hack managed to singe tap a triplet or a stream on a high bpm map where a human wouldn't be able to do that.
Beware that spamming keys at high BPM can also produce fast single taps even though it's humanly possible.
But usually in this case the hits are not going to be 300s.

5. Extra hit is a key press during gameplay time which did not look like an attempt to click a note.
This usually happens when player is spamming or accidentally presses the second key.
Such hits do not indicate any kind of hacking but the number of extra hits (especially 0) can provide a worthy statistical knowledge.

6. Effortless miss is a miss that didn't have a corresponding hit attempt.
Sometimes that happens during miss aimed notes using relax hack when it is poorly configured.

7. Average frametime difference is equivalent to the period of cursor position scan event during the replay.
This value is usually around 12.2-14.5ms for nomod plays and 16.5-22ms for DT plays (as the time goes faster, osu! is scanning frames less frequent in the absolute value).
A poor timewarp might not correctly encode the replay information which will result in effecient timewarp detection.
There's an automatic indicator of timewarp usage within this calculation, but it only applies to HT, DT and NC.
Timewarp detection at nomod speed seemed to be very unreliable so we skipped it.
If the program alerts about timewarp being used and the replay file doesn't look abnormal (e.g. missing all circles on purpose), then you can consider it as a positive.
NEW: The second version of the average frametime difference algorithm only takes inputs where K1/K2/M1/M2 were not used, to prevent false positives on >=225BPM deathstream maps and also detect cheaters with abnormal playstyles.

8. Average key press time interval represents for how long the key are held for during note hits.
Sliders and extra hits are not included. Lower values represent better finger control and inhumanly low values indicate timewarp or relax.
This conclusion though would require exhausting amount of statistics.

NOTE!! Absolute most of the found values do not automatically indicate cheating and require manual investigation of the replay files.
DO NOT jump into conclusions without good evidence.",
                    HorizontalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Disabled,
                    VerticalScrollBarVisibility   = System.Windows.Controls.ScrollBarVisibility.Auto
                },

                Owner = GetWindow(this)
            };


            dialog.Show();
        }
Пример #25
0
        private static void SyncHostToDeviceCompleteDialog(bool cancelled, bool didShowProgress, LtoFlashViewModel ltoFlashViewModel, IDictionary <string, FailedOperationException> warnings)
        {
            ltoFlashViewModel.HostPCMenuLayout.ShowOverlay = false;
            bool showDialog = true;

            if (cancelled && (ltoFlashViewModel.ActiveLtoFlashDevice.Device.FileSystem.Status == LfsDirtyFlags.None))
            {
                showDialog = false;
            }
            if (showDialog)
            {
                var title   = cancelled ? Resources.Strings.SyncHostToDeviceCommandCancelled_Title : Resources.Strings.SyncHostToDeviceCommandComplete_Title;
                var message = string.Empty;
                if (cancelled)
                {
                    if (ltoFlashViewModel.ActiveLtoFlashDevice.Device.FileSystem.Status == LfsDirtyFlags.None)
                    {
                        message = Resources.Strings.SyncHostToDeviceCommandCancelledNoChanges_Message;
                    }
                    else
                    {
                        message = Resources.Strings.SyncHostToDeviceCommandCancelled_Message;
                    }
                }
                else
                {
                    message = Resources.Strings.SyncHostToDeviceCommandComplete_Message;
                }
                var result = OSMessageBoxResult.Yes;
                if ((warnings != null) && warnings.Any())
                {
                    var reportDialog = ReportDialog.Create(title, message);
                    reportDialog.ShowSendEmailButton = false;
                    var warningsBuilder = new System.Text.StringBuilder(Resources.Strings.SyncHostToDeviceCommand_WarningMessage).AppendLine().AppendLine();
                    foreach (var warning in warnings)
                    {
                        warningsBuilder.AppendFormat(Resources.Strings.SyncHostToDeviceCommand_WarningFormat, warning.Key, warning.Value.Message).AppendLine().AppendLine();
                    }
                    if (SingleInstanceApplication.SharedSettings.ShowDetailedErrors)
                    {
                        warningsBuilder.AppendLine(Resources.Strings.SyncHostToDeviceCommand_WarningDetailHeader).AppendLine("------------------------------------------------");
                        foreach (var exception in warnings.Values)
                        {
                            warningsBuilder.AppendLine(exception.ToString()).AppendLine();
                        }
                    }
                    reportDialog.ReportText   = warningsBuilder.ToString();
                    reportDialog.TextWrapping = OSTextWrapping.Wrap;
                    reportDialog.ShowDialog(Resources.Strings.OK);
                }
                else
                {
                    var buttons = cancelled ? OSMessageBoxButton.YesNo : OSMessageBoxButton.OK;
                    result = OSMessageBox.Show(message, title, buttons);
                }
                if (cancelled && (result == OSMessageBoxResult.Yes) && CanSyncHostToDevicePreview(ltoFlashViewModel))
                {
                    SyncHostToDevicePreview(ltoFlashViewModel);
                }
            }
            ltoFlashViewModel.ActiveLtoFlashDevice.Device.GetFileSystemStatistics(GetFileSystemStatisticsErrorHandler);
        }
Пример #26
0
        public GameScene()
        {
            MapControl.AutoRun = false;
            MapControl.AutoHit = false;
            Slaying = false;
            Thrusting = false;
            HalfMoon = false;
            CrossHalfMoon = false;
            DoubleSlash = false;
            TwinDrakeBlade = false;
            FlamingSword = false;

            Scene = this;
            BackColour = Color.Transparent;
            MoveTime = CMain.Time;

            KeyDown += GameScene_KeyDown;

            MainDialog = new MainDialog { Parent = this };
            ChatDialog = new ChatDialog { Parent = this };
            ChatControl = new ChatControlBar { Parent = this };
            InventoryDialog = new InventoryDialog { Parent = this };
            CharacterDialog = new CharacterDialog { Parent = this, Visible = false };
            BeltDialog = new BeltDialog { Parent = this };
            StorageDialog = new StorageDialog { Parent = this, Visible = false };
            MiniMapDialog = new MiniMapDialog { Parent = this };
            InspectDialog = new InspectDialog { Parent = this, Visible = false };
            OptionDialog = new OptionDialog { Parent = this, Visible = false };
            MenuDialog = new MenuDialog { Parent = this, Visible = false };
            NPCDialog = new NPCDialog { Parent = this, Visible = false };
            NPCGoodsDialog = new NPCGoodsDialog { Parent = this, Visible = false };
            NPCDropDialog = new NPCDropDialog { Parent = this, Visible = false };
            NPCAwakeDialog = new NPCAwakeDialog { Parent = this, Visible = false };

            HelpDialog = new HelpDialog { Parent = this, Visible = false };
            
            MountDialog = new MountDialog { Parent = this, Visible = false };
            FishingDialog = new FishingDialog { Parent = this, Visible = false };
            FishingStatusDialog = new FishingStatusDialog { Parent = this, Visible = false };
            
            GroupDialog = new GroupDialog { Parent = this, Visible = false };
            GuildDialog = new GuildDialog { Parent = this, Visible = false };

            BigMapDialog = new BigMapDialog { Parent = this, Visible = false };
            TrustMerchantDialog = new TrustMerchantDialog { Parent = this, Visible = false };
            CharacterDuraPanel = new CharacterDuraPanel { Parent = this, Visible = false };
            DuraStatusPanel = new DuraStatusDialog { Parent = this, Visible = true };
            TradeDialog = new TradeDialog { Parent = this, Visible = false };
            GuestTradeDialog = new GuestTradeDialog { Parent = this, Visible = false };

            //SkillBarDialog = new SkillBarDialog { Parent = this, Visible = false };
            SkillBarDialog Bar1 = new SkillBarDialog { Parent = this, Visible = false, BarIndex = 0 };
            SkillBarDialogs.Add(Bar1);
            SkillBarDialog Bar2 = new SkillBarDialog { Parent = this, Visible = false, BarIndex = 1 };
            SkillBarDialogs.Add(Bar2);
            ChatOptionDialog = new ChatOptionDialog { Parent = this, Visible = false };
            ChatNoticeDialog = new ChatNoticeDialog { Parent = this, Visible = false };

            QuestListDialog = new QuestListDialog { Parent = this, Visible = false };
            QuestDetailDialog = new QuestDetailDialog {Parent = this, Visible = false};
            QuestTrackingDialog = new QuestTrackingDialog { Parent = this, Visible = false };
            QuestLogDialog = new QuestDiaryDialog {Parent = this, Visible = false};

            RankingDialog = new RankingDialog { Parent = this, Visible = false };

            MailListDialog = new MailListDialog { Parent = this, Visible = false };
            MailComposeLetterDialog = new MailComposeLetterDialog { Parent = this, Visible = false };
            MailComposeParcelDialog = new MailComposeParcelDialog { Parent = this, Visible = false };
            MailReadLetterDialog = new MailReadLetterDialog { Parent = this, Visible = false };
            MailReadParcelDialog = new MailReadParcelDialog { Parent = this, Visible = false };

            IntelligentCreatureDialog = new IntelligentCreatureDialog { Parent = this, Visible = false };
            IntelligentCreatureOptionsDialog = new IntelligentCreatureOptionsDialog { Parent = this, Visible = false };
            IntelligentCreatureOptionsGradeDialog = new IntelligentCreatureOptionsGradeDialog { Parent = this, Visible = false };

            RefineDialog = new RefineDialog { Parent = this, Visible = false };
            RelationshipDialog = new RelationshipDialog { Parent = this, Visible = false };
            FriendDialog = new FriendDialog { Parent = this, Visible = false };
            MemoDialog = new MemoDialog { Parent = this, Visible = false };
            MentorDialog = new MentorDialog { Parent = this, Visible = false };
            GameShopDialog = new GameShopDialog { Parent = this, Visible = false };

            ReportDialog = new ReportDialog { Parent = this, Visible = false };

            //not added yet
            KeyboardLayoutDialog = new KeyboardLayoutDialog { Parent = this, Visible = false };

            for (int i = 0; i < OutputLines.Length; i++)
                OutputLines[i] = new MirLabel
                {
                    AutoSize = true,
                    BackColour = Color.Transparent,
                    Font = new Font(Settings.FontName, 10F),
                    ForeColour = Color.LimeGreen,
                    Location = new Point(20, 25 + i * 13),
                    OutLine = true,
                };
        }
Пример #27
0
        private void GetDeviceErrorAndCrashLogsComplete(ErrorLog errorLog, CrashLog crashLog)
        {
            var hasErrorLog = (errorLog != null) && !errorLog.IsEmpty;
            var hasCrashLog = crashLog != null;

            if (hasErrorLog || hasCrashLog)
            {
                var reportText = (new System.Text.StringBuilder(Resources.Strings.CrashReporter_DetailHeader)).AppendLine();
                if (Device != null)
                {
                    reportText.AppendLine("Device Primary Firmware Version: " + FirmwareRevisions.FirmwareVersionToString(Device.FirmwareRevisions.Primary, false));
                    reportText.AppendLine("Device Secondary Firmware Version: " + FirmwareRevisions.FirmwareVersionToString(Device.FirmwareRevisions.Secondary, false));
                    reportText.AppendLine("Device Current Firmware Version: " + FirmwareRevisions.FirmwareVersionToString(Device.FirmwareRevisions.Current, false));
                }
                else
                {
                    reportText.AppendLine("Device firmware versions unavailable");
                }
                reportText.AppendLine(Resources.Strings.CrashReporter_Detail_DeviceId + " " + Device.UniqueId);
                var timestamp = PathUtils.GetTimeString(true);
                reportText.AppendLine(Resources.Strings.CrashReporter_Detail_Timestamp + " " + timestamp);
                var errorReportFiles = new List <string>();
                if (hasCrashLog)
                {
                    var crashLogFileName = string.Empty;
                    try
                    {
                        System.IO.Directory.CreateDirectory(Configuration.Instance.ErrorLogDirectory);
                        crashLogFileName = PathUtils.EnsureUniqueFileName(System.IO.Path.Combine(Configuration.Instance.ErrorLogDirectory, CrashLog.CrashLogFileName));
                        using (var crashLogFile = System.IO.File.Create(crashLogFileName))
                        {
                            using (var writer = new ASCIIBinaryWriter(crashLogFile))
                            {
                                crashLog.Serialize(writer);
                            }
                        }
                        errorReportFiles.Add(crashLogFileName);
                    }
                    catch (System.Exception)
                    {
                        // We got an error trying to write the error log...
                    }
                    finally
                    {
                        if (!System.IO.File.Exists(crashLogFileName))
                        {
                            crashLogFileName = Resources.Strings.CrashReporter_Detail_CrashLogUnavailable;
                        }
                    }
                    reportText.AppendLine().AppendFormat(Resources.Strings.CrashReporter_Detail_FirmwareCrashFormat, crashLogFileName);
                }
                if (hasErrorLog)
                {
                    if (hasCrashLog)
                    {
                        reportText.AppendLine();
                    }
                    var errorLogFileName = string.Empty;
                    try
                    {
                        System.IO.Directory.CreateDirectory(Configuration.Instance.ErrorLogDirectory);
                        errorLogFileName = PathUtils.EnsureUniqueFileName(System.IO.Path.Combine(Configuration.Instance.ErrorLogDirectory, "ErrorLog.txt"));
                        using (var errorLogFile = System.IO.File.Create(errorLogFileName))
                        {
                            using (var writer = new ASCIIBinaryWriter(errorLogFile))
                            {
                                errorLog.SerializeToTextFile(Device.FirmwareRevisions.Current, writer);
                            }
                        }
                        errorReportFiles.Add(errorLogFileName);
                    }
                    catch (System.Exception)
                    {
                        // TODO Really? All exceptions? Perhaps be a bit more selective here.
                    }
                    finally
                    {
                        if (!System.IO.File.Exists(errorLogFileName))
                        {
                            errorLogFileName = Resources.Strings.CrashReporter_Detail_ErrorLogUnavailable;
                        }
                    }
                    var errorLogText = errorLog.GetDetailedErrorReport(Device.FirmwareRevisions.Current);
                    reportText.AppendLine().AppendFormat(System.Globalization.CultureInfo.CurrentCulture, Resources.Strings.CrashReporter_Detail_ErrorLogFormat, errorLogText, errorLogFileName);
                }
                var title        = Resources.Strings.CrashReporter_Title;
                var message      = Resources.Strings.CrashReporter_Message;
                var reportDialog = ReportDialog.Create(title, message);
                reportDialog.TextWrapping = OSTextWrapping.Wrap;
                reportDialog.ReportText   = reportText.ToString();
                errorReportFiles.ForEach(f => reportDialog.Attachments.Add(f));
                if (hasErrorLog || hasCrashLog)
                {
                    var cc = new List <string>();
                    cc.Add("*****@*****.**");
                    reportDialog.EmailCCRecipients = cc;
                }
                reportDialog.ShowDialog(Resources.Strings.Close);
            }
        }
Пример #28
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ReportDialog report = new ReportDialog(vm);

            report.ShowDialog();
        }