private void AddCustomToolBarItems()
        {
            var productCategoryButtonItem = new BarButtonItem
            {
                Name    = "ProductCategory",
                Content = "دسته بندی",
                Glyph   = ImageUtility.CreateSvgImage("Icons/NavigationBar/ProductCategory_Large.svg"),
            };

            productCategoryButtonItem.ItemClick += ProductCategoryButtonItemOnItemClick;
            ToolBarItems.Add("ProductCategory", productCategoryButtonItem);
        }
Beispiel #2
0
 private void TimerOnElapsed(object sender, EventArgs e)
 {
     using (var dbContext = new FarnahadManufacturingDbContext())
     {
         var dbIsAlive = dbContext.Database.Exists();
         if (dbIsAlive)
         {
             ConnectionStatusBarButtonItem.Glyph =
                 ImageUtility.CreateSvgImage("Icons/ToolBar/connection_green_small.svg");
         }
         else
         {
             ConnectionStatusBarButtonItem.Glyph =
                 ImageUtility.CreateSvgImage("Icons/ToolBar/connection_red_small.svg");
         }
     }
 }
Beispiel #3
0
 private void OpenUserControlInNewTab <T>(string tabHeader) where T : UserControlPage
 {
     if (!UserControlIsAlreadyOpen <T>())
     {
         var userControl = (UserControlPage)Activator.CreateInstance <T>();
         var panel       = new FmDocumentPanel();
         panel.TabCaption = tabHeader;
         panel.Content    = userControl;
         if (!string.IsNullOrEmpty(userControl.ImagePath))
         {
             panel.CaptionImage = ImageUtility.CreateSvgImage(userControl.ImagePath);
         }
         panel.IsVisibleChanged += PanelOnIsVisibleChanged;
         MyDocumentGroup.Add(panel);
         panel.IsActive = true;
     }
     else
     {
         ActivateTheUserControl <T>();
     }
 }
 public FmSaveBarButtonItem()
 {
     Name    = "Save";
     Content = "ذخیره";
     Glyph   = ImageUtility.CreateSvgImage("Icons/ToolBar/Save.svg");
 }
 public FmEditBarButtonItem()
 {
     Name    = "Edit";
     Content = "ویرایش";
     Glyph   = ImageUtility.CreateSvgImage("Icons/ToolBar/Edit.svg");
 }
Beispiel #6
0
 public FmAddBarButtonItem()
 {
     Name    = "Add";
     Content = "اضافه";
     Glyph   = ImageUtility.CreateSvgImage("Icons/ToolBar/Add.svg");
 }
 public FmDeleteBarButtonItem()
 {
     Name    = "Delete";
     Content = "حذف";
     Glyph   = ImageUtility.CreateSvgImage("Icons/ToolBar/Delete.svg");
 }