private void BlankWindow_Click(object sender, RoutedEventArgs e) { // create a blank modern window with lorem content // the BlankWindow ModernWindow styles is found in the mui assembly at Assets/ModernWindowStyles.xaml var wnd = new ModernWindow { Style = (Style)App.Current.Resources["BlankWindow"], Title = "ModernWindow", IsTitleVisible = true == this.title.IsChecked, Content = new LoremIpsum(), Width = 480, Height = 480 }; if (true == this.logo.IsChecked) { wnd.LogoData = PathGeometry.Parse("F1 M 24.9015,43.0378L 25.0963,43.4298C 26.1685,49.5853 31.5377,54.2651 38,54.2651C 44.4623,54.2651 49.8315,49.5854 50.9037,43.4299L 51.0985,43.0379C 51.0985,40.7643 52.6921,39.2955 54.9656,39.2955C 56.9428,39.2955 58.1863,41.1792 58.5833,43.0379C 57.6384,52.7654 47.9756,61.75 38,61.75C 28.0244,61.75 18.3616,52.7654 17.4167,43.0378C 17.8137,41.1792 19.0572,39.2954 21.0344,39.2954C 23.3079,39.2954 24.9015,40.7643 24.9015,43.0378 Z M 26.7727,20.5833C 29.8731,20.5833 32.3864,23.0966 32.3864,26.197C 32.3864,29.2973 29.8731,31.8106 26.7727,31.8106C 23.6724,31.8106 21.1591,29.2973 21.1591,26.197C 21.1591,23.0966 23.6724,20.5833 26.7727,20.5833 Z M 49.2273,20.5833C 52.3276,20.5833 54.8409,23.0966 54.8409,26.197C 54.8409,29.2973 52.3276,31.8106 49.2273,31.8106C 46.127,31.8106 43.6136,29.2973 43.6136,26.197C 43.6136,23.0966 46.127,20.5833 49.2273,20.5833 Z"); } if (true == this.noresize.IsChecked) { wnd.ResizeMode = ResizeMode.NoResize; } else if (true == this.canminimize.IsChecked) { wnd.ResizeMode = ResizeMode.CanMinimize; } else if (true == this.canresize.IsChecked) { wnd.ResizeMode = ResizeMode.CanResize; } else if (true == this.canresizewithgrip.IsChecked) { wnd.ResizeMode = ResizeMode.CanResizeWithGrip; } wnd.Show(); }
private void PreviewManifestAction() { var data = this.GetInvoiceReportModel(); var config = HelperPrint.GetReportSetting(); var configSource = new ReportDataSource { Value = config, Name = "Config" }; config.FirstOrDefault().SignName = ResourcesBase.User.FullName ?? ResourcesBase.User.UserName; var dataSource = new ReportDataSource { Value = data.OrderBy(x => x.STT), Name = "DataSet1" }; var datasources = new List <ReportDataSource> { dataSource, configSource }; var content = new Reports.Contents.ReportContent(datasources, "TrireksaApp.Reports.Layouts.InvoiceLayout.rdlc", null); var dlg = new FirstFloor.ModernUI.Windows.Controls.ModernWindow { Content = content, Title = "Invoice", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); }
public PMViewer(Field field, ModernWindow window, bool isDiff = false, string headingtext = "") { InitializeComponent(); CurrentField = field; _associatedWindow = window; _associatedWindow.Title = "Model View"; ShowProcessModelInCanvas(); _associatedWindow.PreviewKeyDown += HandleShortcuts; _associatedWindow.PreviewMouseWheel += Zoom; HeadingText.Text = headingtext != "" ? headingtext : field.Infotext; //IsDiff = isDiff; //if (IsDiff) //{ // CloseButton1.Visibility = Visibility.Visible; // ShowLegend(); //} //else //{ // CloseButton1.Visibility = Visibility.Hidden; //} }
public PMInfo(Dictionary<string, string> information, ModernWindow window) { InitializeComponent(); PMInformationList.ItemsSource = information; _parentWindow = window; _parentWindow.PreviewKeyDown += HandleShortcuts; }
private void PrintpreviewReportAction(object obj) { var data = MainVM.InvoiceCollections.SourceView.Cast <ModelsShared.Models.Invoice>().ToList(); if (data != null && data.Count > 0) { StringBuilder sb = new StringBuilder(); if (IsUnpaid) { AddText("Belum Dibayar", sb); } if (IsPaid) { AddText("Terbayar", sb); } if (IsPending) { AddText("Pending", sb); } if (IsPaid) { AddText("Batal", sb); } if (sb.Length <= 0) { sb.Append("Laporan Invoice"); } var p = new ReportParameter() { Name = "Title" }; p.Values.Add(sb.ToString()); ReportParameter[] param = new ReportParameter[] { p }; var list = new List <InvoiceReport>(); foreach (var item in data) { list.Add(new InvoiceReport(item)); } var content = new Reports.Contents.ReportContent(new Microsoft.Reporting.WinForms.ReportDataSource { Value = list }, "TrireksaApp.Reports.Layouts.InvoiceReportLayout.rdlc", param); var dlg = new FirstFloor.ModernUI.Windows.Controls.ModernWindow { Content = content, Title = "Daftar Invoice", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); } }
private Attributes() { pk = -1; window = App.Current.MainWindow as ModernWindow; group0 = window.MenuLinkGroups.ElementAt(0); group1 = window.MenuLinkGroups.ElementAt(1); window.MenuLinkGroups.RemoveAt(1); }
private void EmptyWindow_Click(object sender, RoutedEventArgs e) { // create an empty modern window with lorem content // the EmptyWindow ModernWindow styles is found in the mui assembly at Assets/ModernWindowEx.xaml var wnd = new ModernWindow { Style = (Style)App.Current.Resources["EmptyWindow"], Content = new LoremIpsum { Margin = new Thickness(32) }, Width = 480, Height = 480 }; wnd.Show(); }
private void PreviewManifestAction() { var data = this.GetInvoiceReportModel(); var content = new Reports.Contents.ReportContent(new Microsoft.Reporting.WinForms.ReportDataSource { Value = data.OrderBy(O => O.STT) }, "TrireksaApp.Reports.Layouts.InvoiceLayout.rdlc", null); var dlg = new FirstFloor.ModernUI.Windows.Controls.ModernWindow { Content = content, Title = "Invoice", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); }
private void btn_Web_Click(object sender, RoutedEventArgs e) { ModernWindow mw = new ModernWindow(); WebBrowser wb = new WebBrowser(); mw.Content = wb; wb.Navigate("http://mp.weixin.qq.com/s?__biz=MzAxMzI4MTUxMw==&mid=204472346&idx=1&sn=97445b23d97c280fa920134d2348a298&scene=2#rd"); mw.Show(); }
/// <summary> /// Method for the right click on a transition. /// This method opens a footprintviewer /// </summary> /// <autor>Andrej Albrecht</autor> private static void Transition_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { try { Thumb thumb = (Thumb)sender; String transitionName = thumb.GetValue(ContentProperty).ToString(); ModernWindow footprintViewer = new ModernWindow { Style = (Style)Application.Current.Resources["EmptyWindow"], Width = 600, Height = 550, Content = new FootprintViewer(transitionName), //Topmost = true }; footprintViewer.ShowDialog(); } catch (Exception Ex) { ErrorHandling.ReportErrorToUser("Error: " + Ex.Message + Ex.StackTrace); } }
/// <summary> /// Compares two or three process models /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <author>Thomas Meents, Christopher Licht</author> private void CompareClick(object sender, RoutedEventArgs e) { switch (ListOfChoosenProcessModels.Count) { case 2: { try { IDifference diff = DiffFactory.CreateDifferenceObject<SnapshotDiff>(); Field diffField = new Field { ProcessModel = diff.CompareProcessModels(ListOfChoosenProcessModels) }; if (diffField.ProcessModel != null && diffField.ProcessModel.GetType() == typeof(PetriNet)) { String title = String.Join(", ", ListOfChoosenProcessModels.Select(pm => pm.Name)); ModernWindow pmDiffWindow = new ModernWindow { Style = (Style)Application.Current.Resources["EmptyWindow"], Width = 1000, Height = 600, Owner = Application.Current.MainWindow, Title = title }; pmDiffWindow.Content = new PMViewer(diffField, pmDiffWindow, true, title); pmDiffWindow.Show(); } } catch (Exception Ex) { ErrorHandling.ReportErrorToUser("Error: " + Ex.Message); } } break; case 0: ModernDialog.ShowMessage("No process model checkboxes are checked", "Tip", MessageBoxButton.OK); break; default: ModernDialog.ShowMessage("Only two process models can be compared.\nCheck some checkboxes and click Compare to see the differences.", "Tip", MessageBoxButton.OK); break; } }