Esempio n. 1
0
        protected override void OnInitialized(EventArgs e) //此为窗口已加载
        {
            base.OnInitialized(e);
            Instance = this;
            //默认设定为日间模式
            ResourceDictionary theme = new ResourceDictionary
            {
                Source = new Uri("pack://application:,,,/Resource/Style/Theme/BaseLight.xaml")
            };

            Resources.MergedDictionaries.Add(theme);

            //判断之前设定的路径是否存在
            string location = Properties.Settings.Default.FileLocation;

            if (location != null && location != string.Empty && !Directory.Exists(location))
            {
                Growl.Warning("所指定的文件夹位置已不存在, 请重新指定.");
                Properties.Settings.Default.FileLocation = null;
            }
            else
            {
                RefreshFiles(null, null);
            }
        }
        public async void Confim()
        {
            if (AccessToken.IsNotBlank())
            {
                (string msg, LoginKey key) = await Client.Login(AccessToken);

                if (msg.IsNotBlank() || key == null)
                {
                    Growl.Warning("Accesstoken is not valid! " + msg, Global.TOKEN_MAIN);
                }
                else if (key.UserID != Global.CommonKey.UserID)
                {
                    Growl.Warning("User mismatch! Please use your own accesstoken.", Global.TOKEN_MAIN);
                }
                else
                {
                    UserSettings user = UserSettings.Read();
                    user.Accesstoken = AccessToken;
                    user.Save();
                    Global.AccessKey = key;
                }
            }

            Settings.Change(Settings, Global.Settings);

            Global.Settings = Settings;
            Global.Settings.Save();

            Load();
            Growl.Success("Refresh settings success!", Global.TOKEN_MAIN);
        }
Esempio n. 3
0
        public async void Warn(string msg)
        {
            await WaitForTokenLoaded();

            if (Thread.CurrentThread != App.Current.Dispatcher.Thread)
            {
                App.Current.Dispatcher.Invoke(() =>
                {
                    Growl.Warning(msg, Token);
                });
            }
        }
Esempio n. 4
0
        private void CoverContextMenu_Click(object sender, RoutedEventArgs e)
        {
            MenuItem info = sender as MenuItem;

            if (info.Header.Equals(Properties.Langs.Lang.SetasDesktop))
            {
                SetDesktopWallpaper(info.Tag.ToString(), true);
            }
            else if (info.Header.Equals(Properties.Langs.Lang.GoToLoc))
            {
                System.Diagnostics.Process.Start("explorer.exe", "/select, \"" + info.Tag + "\"");
            }
            else if (info.Header.Equals(Properties.Langs.Lang.FullScreenSee))
            {
                ImageBrowser imgBrowser = new ImageBrowser(new Uri(info.Tag.ToString(), UriKind.Absolute))
                {
                    ResizeMode = ResizeMode.CanResize
                };
                imgBrowser.Show();
            }
            else if (info.Header.Equals(Properties.Langs.Lang.Fav))
            {
                if (System.IO.File.Exists(AppVar.FavoriteFilePath))
                {
                    bool lines = System.IO.File.ReadAllLines(AppVar.FavoriteFilePath).Any(x => x.Equals(info.Tag.ToString().Trim()));
                    if (!lines)
                    {
                        System.IO.File.AppendAllText(AppVar.FavoriteFilePath, info.Tag.ToString().Trim() + Environment.NewLine);
                        Growl.Info(new GrowlInfo
                        {
                            Message      = Properties.Langs.Lang.AddedToFav,
                            ConfirmStr   = Properties.Langs.Lang.Confirm,
                            ShowDateTime = false
                        });
                    }
                    else
                    {
                        Growl.Warning(new GrowlInfo
                        {
                            Message      = Properties.Langs.Lang.ExistFav,
                            ConfirmStr   = Properties.Langs.Lang.Confirm,
                            ShowDateTime = false
                        });
                    }
                }
            }
            else if (info.Header.Equals(Properties.Langs.Lang.RemoveFromFav))
            {
                List <string> lines = System.IO.File.ReadAllLines(AppVar.FavoriteFilePath).ToList();
                lines.Remove(info.Tag.ToString().Trim());
                System.IO.File.WriteAllLines(AppVar.FavoriteFilePath, lines.ToArray());
            }
        }
Esempio n. 5
0
        public void GetAccessToken()
        {
            (string msg, LoginKey key) = TidalLib.Client.GetAccessTokenFromTidalDesktop(UserID);
            if (msg.IsNotBlank())
            {
                Growl.Warning(msg, Global.TOKEN_MAIN);
                return;
            }

            Growl.Success(Language.Get("strmsgGetAccessTokenSuccess"), Global.TOKEN_MAIN);
            AccessToken = key.AccessToken;
        }
Esempio n. 6
0
 public LocpackData(JObject json)
 {
     try
     {
         DisplayName  = json.Value <string>("Name");
         InternalName = json.Value <string>("ModName");
         Author       = json.Value <string>("Author");
         Description  = json.Value <string>("Description");
         Version      = json.Value <string>("Version");
         ModVersion   = json.Value <string>("ModVersion");
         Language     = json.Value <string>("Language");
     }
     catch (Exception ex) { Growl.Warning($"读取包数据时发生错误.\n{ex.Message}"); }
 }
Esempio n. 7
0
        private void SaveAll_OnClick(object sender, RoutedEventArgs e)
        {
            var result = ImageViewer.SaveFile(true);

            Growl.Clear();
            if (result)
            {
                Growl.Success($"图片已导出至{ImageViewer.FileDirectory}\\{ImageViewer.FileName}文件夹!");
            }
            else
            {
                Growl.Warning("未选中需要导出的图片!");
            }
        }
Esempio n. 8
0
        private void Save_OnClick(object sender, RoutedEventArgs e)
        {
            var result = ImageViewer.SaveFile(false);

            Growl.Clear();
            if (result)
            {
                Growl.Success("图片已导出!");
            }
            else
            {
                Growl.Warning("取消导出!");
            }
        }
Esempio n. 9
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            var info = sender as MenuItem;

            if (info.Header.Equals("Set as Desktop"))
            {
                SetDesktopWallpaper(info.Tag.ToString(), true);
            }
            else if (info.Header.Equals("Go to Location"))
            {
                Process.Start("explorer.exe", "/select, \"" + info.Tag + "\"");
            }
            else if (info.Header.Equals("Full Screen"))
            {
                var imgBrowser = new ImageBrowser(new Uri(info.Tag.ToString(), UriKind.Absolute));
                imgBrowser.ResizeMode = ResizeMode.CanResize;
                imgBrowser.Show();
            }
            else if (info.Header.Equals("Add To Favorite"))
            {
                if (File.Exists("fav.txt"))
                {
                    var lines = File.ReadAllLines("fav.txt").Any(x => x.Equals(info.Tag.ToString().Trim()));
                    if (!lines)
                    {
                        File.AppendAllText("fav.txt", info.Tag.ToString().Trim() + Environment.NewLine);
                        Growl.Info(new GrowlInfo
                        {
                            Message = "Added to Favorite", ConfirmStr = "Confirm", ShowDateTime = false
                        });
                    }
                    else
                    {
                        Growl.Warning(new GrowlInfo
                        {
                            Message      = "This image exist in favorite",
                            ConfirmStr   = "Confirm",
                            ShowDateTime = false
                        });
                    }
                }
            }
            else if (info.Header.Equals("Remove From Favorite"))
            {
                var lines = File.ReadAllLines("fav.txt").ToList();
                lines.Remove(info.Tag.ToString().Trim());
                File.WriteAllLines("fav.txt", lines.ToArray());
            }
        }
Esempio n. 10
0
        public async void Warn(string msg)
        {
            await WaitForTokenLoaded();

            App.Current.Dispatcher.Invoke(() =>
            {
                if (Program.CliOptions.GlobalNotification)
                {
                    Growl.WarningGlobal(msg);
                }
                else
                {
                    Growl.Warning(msg, Token);
                }
            });
        }
Esempio n. 11
0
        private static void ShowNotificationInApp(string message, ENotificationType type)
        {
            Action action = type switch
            {
                ENotificationType.Success => () => Growl.Success(message),
                ENotificationType.Info => () => Growl.Info(message),
                ENotificationType.Warning => () => Growl.Warning(message),
                ENotificationType.Error => () => Growl.Error(message),
                ENotificationType.Fatal => () => Growl.Fatal(message),
                _ => throw new ArgumentOutOfRangeException(nameof(type), type, null)
            };
            Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, action);
        }

        #endregion
    }
Esempio n. 12
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            _sr.InteractiveTask(() =>
            {
                try
                {
                    var path = Helper.GetMilFilePathRaw(".consent");

                    using (new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite))
                    {
                        File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden);
                    }
                }
                catch
                {
                    Growl.Warning("无法创建标记文件,您未来可能需要再次阅读此内容");
                }


                SubwindowNavigator.Navigate(SubwindowPage.LoggedOut);
            });
        }
Esempio n. 13
0
        private void SName_SearchStarted(object sender, FunctionEventArgs <string> e)
        {
            string name = SName.Text;

            if (string.IsNullOrEmpty(name) || name == "")
            {
                Growl.Warning(new GrowlInfo
                {
                    Message           = "请输入内容",
                    WaitTime          = 3,
                    ActionBeforeClose = isConfirmed =>
                    {
                        Growl.Info(isConfirmed.ToString());
                        return(true);
                    },
                    Token = "SuccessMsg"
                });
                return;
            }
            d = Dialog.Show <ProgressDialog>();
            new Task(() => { Red(name); }).Start();
        }
Esempio n. 14
0
        public async void Confim()
        {
            if (AccessToken.IsNotBlank())
            {
                (string msg, LoginKey key) = await Client.Login(AccessToken);

                if (msg.IsNotBlank() || key == null)
                {
                    Growl.Warning(Language.Get("strmsgAccessTokenIsNotValid") + msg, Global.TOKEN_MAIN);
                }
                else if (key.UserID != Global.CommonKey.UserID)
                {
                    Growl.Warning(Language.Get("strmsgUserMismatch"), Global.TOKEN_MAIN);
                }
                else
                {
                    UserSettings user = UserSettings.Read();
                    user.Accesstoken = AccessToken;
                    user.Save();
                    Global.AccessKey = key;
                }
            }
            else
            {
                UserSettings user = UserSettings.Read();
                user.Accesstoken = null;
                user.Save();
                Global.AccessKey = null;
            }

            Settings.Change(Settings, Global.Settings);

            Global.Settings = Settings;
            Global.Settings.Save();

            Load();
            Growl.Success(Language.Get("strmsgRefreshSettingsSuccess"), Global.TOKEN_MAIN);
        }
Esempio n. 15
0
        public void Confim()
        {
            Config.ThreadNum(ThreadNum.ToString());
            Config.SearchNum(SearchNum.ToString());
            Config.OnlyM4a(OnlyM4a.ToString());
            Config.AddExplicitTag(AddExplicitTag.ToString());
            Config.SaveCovers(SaveCovers.ToString());
            Config.IncludeEP(IncludeEPSingle.ToString());
            Config.CheckExist(CheckExist.ToString());
            Config.ArtistBeforeTitle(ArtistBeforeTitle.ToString());
            Config.AddHyphen(AddHyphen.ToString());
            Config.AddYear(AddYearIndex);
            Config.OutputDir(OutputDir);
            Config.UseTrackNumber(UseTrackNumber.ToString());
            Config.MaxFileName(MaxFileName.ToString());
            Config.MaxDirName(MaxDirName.ToString());
            Config.AddAlbumIDBeforeFolder(AddAlbumIDBeforeFolder.ToString());
            Config.ThemeIndex(ThemeIndex.ToString());

            TidalTool.SetSearchMaxNum(int.Parse(Config.SearchNum()));
            ThreadTool.SetThreadNum(ThreadNum);
            ChangeTheme(ThemeIndex);

            if (AccessToken.IsNotBlank())
            {
                if (TidalTool.loginByAccesstoken(AccessToken))
                {
                    Config.Accesstoken(AccessToken);
                }
                else
                {
                    Growl.Warning("Accesstoken is not valid!", "SettingsMsg");
                    return;
                }
            }
            Growl.Success("Refresh settings success!", "SettingsMsg");
        }
Esempio n. 16
0
 public static void Warning(string message)
 {
     Growl.Warning(App.Current.Resources[message]?.ToString() ?? message, TOKEN_PANEL_MAIN);
 }
Esempio n. 17
0
 internal static void FailedToConvertImage(Exception exception) => Growl.Warning(GetGrowlInfo($"Failed to convert an image! {exception.Message}"));
Esempio n. 18
0
        public MainWindow(MainWindowViewModel viewModel)
        {
            InitializeComponent();
            ViewModel  = viewModel;
            growlToken = GrowlStackPanel.Name;
            Growl.Register(growlToken, GrowlStackPanel);
            this.WhenActivated(disposableRegistration =>
            {
                this.OneWayBind(ViewModel,
                                vm => vm.AccountAuthorityLevel,
                                v => v.LoginSideMenu.Visibility,
                                value => value == AuthorityLevel.Visitor ? Visibility.Visible : Visibility.Collapsed)
                .DisposeWith(disposableRegistration);
                this.OneWayBind(ViewModel,
                                vm => vm.AccountAuthorityLevel,
                                v => v.RegisterSideMenu.Visibility,
                                value => value == AuthorityLevel.Visitor ? Visibility.Visible : Visibility.Collapsed)
                .DisposeWith(disposableRegistration);
                this.OneWayBind(ViewModel,
                                vm => vm.AccountAuthorityLevel,
                                v => v.BorrowLogSideMenu.Visibility,
                                value => value >= AuthorityLevel.Member ? Visibility.Visible : Visibility.Collapsed)
                .DisposeWith(disposableRegistration);
                this.OneWayBind(ViewModel,
                                vm => vm.AccountAuthorityLevel,
                                v => v.AccountInfoSideMenu.Visibility,
                                value => value >= AuthorityLevel.Member ? Visibility.Visible : Visibility.Collapsed)
                .DisposeWith(disposableRegistration);
                this.OneWayBind(ViewModel,
                                vm => vm.AccountAuthorityLevel,
                                v => v.BooksSideMenu.Visibility,
                                value => value >= AuthorityLevel.Member ? Visibility.Visible : Visibility.Collapsed)
                .DisposeWith(disposableRegistration);

                Observable.FromEventPattern(MainSideMenu, nameof(MainSideMenu.SelectionChanged))
                .Select(ep => (ep.EventArgs as FunctionEventArgs <object>)?.Info as SideMenuItem)
                .Where(smi => smi != null)
                .Subscribe(smi => Navigate(smi.Name))
                .DisposeWith(disposableRegistration);

                Observable.FromEventPattern(AboutMenuItem, nameof(AboutMenuItem.Click))
                .Subscribe(ep => aboutWindow.Show())
                .DisposeWith(disposableRegistration);

                foreach (SideMenuItem smi in MainSideMenu.Items.OfType <SideMenuItem>().SelectMany(smi => smi.Items).OfType <SideMenuItem>())
                {
                    sideMenuItems.Add(smi.Name, smi);
                }

                // 注册右上角漂浮通知
                ViewModel.GUINotify.RegisterHandler(async interactioni =>
                {
                    await Task.Run(() =>
                    {
                        GUINotifyingDataPackage info = interactioni.Input;
                        interactioni.SetOutput(Unit.Default);
                        GrowlInfo growlInfo = new GrowlInfo
                        {
                            Message   = info.Message,
                            WaitTime  = (int)info.Duration.TotalSeconds,
                            Token     = growlToken,
                            StaysOpen = false,
                            IsCustom  = true
                        };
                        switch (info.Type)
                        {
                        case NotifyingType.Success:
                            growlInfo.WaitTime = growlInfo.WaitTime == 0 ? 4 : growlInfo.WaitTime;
                            Growl.Success(growlInfo);
                            break;

                        default:
                        case NotifyingType.Info:
                            growlInfo.WaitTime = growlInfo.WaitTime == 0 ? 4 : growlInfo.WaitTime;
                            Growl.Info(growlInfo);
                            break;

                        case NotifyingType.Warning:
                            growlInfo.WaitTime = growlInfo.WaitTime == 0 ? 6 : growlInfo.WaitTime;
                            Growl.Warning(growlInfo);
                            break;

                        case NotifyingType.Error:
                            growlInfo.WaitTime = growlInfo.WaitTime == 0 ? 8 : growlInfo.WaitTime;
                            Growl.Error(growlInfo);
                            break;

                        case NotifyingType.Fatal:
                            growlInfo.WaitTime = growlInfo.WaitTime == 0 ? 10 : growlInfo.WaitTime;
                            Growl.Fatal(growlInfo);
                            break;
                        }
                    });
                });
            });
        }
Esempio n. 19
0
        public static List <LocpackData> ReadAllLocpack()
        {
            /*return await Task.Run(() => {
             *
             * });*/
            List <LocpackData> list = new List <LocpackData>();
            string             path = Properties.Settings.Default.FileLocation;

            if (path == null || path == string.Empty)
            {
                Growl.Warning("未指定Localizer汉化包存放位置.");
                return(list);
            }
            var files = Directory.GetFiles(path, "*.locpack");

            if (files.Any())
            {
                foreach (var filename in files)
                {
                    try  //开始读取单个文件
                    {
                        var jsons = new Dictionary <string, JObject>();
                        var zip   = ZipFile.Read(filename);
                        if (!zip.ContainsEntry("Package.json"))
                        {
                            Growl.Info($"未在文件 {filename} 中找到 Package.json, 文件可能损坏或非Localizer汉化包.");
                            continue;
                        }
                        var json = JObject.Parse(new StreamReader(zip["Package.json"].OpenReader()).ReadToEnd());
                        jsons.Add("Package", json);
                        var  locpackdata = new LocpackData(json);
                        long count       = 0;
                        foreach (string zipfile in json["FileList"].ToArray())
                        {
                            try
                            {
                                if (zip.ContainsEntry(zipfile + ".json"))
                                {
                                    var tempjson = JObject.Parse(new StreamReader(zip[zipfile + ".json"].OpenReader()).ReadToEnd());
                                    jsons.Add(zipfile, tempjson);
                                    switch (zipfile)
                                    {
                                    case "Package":
                                        break;

                                    case "LdstrFile":
                                        foreach (var ldstrentries in tempjson["LdstrEntries"].Children())
                                        {
                                            count += ldstrentries.Children().Count();
                                        }
                                        break;

                                    default:
                                        count += tempjson.Count;
                                        break;
                                    }
                                }
                            }
                            catch (Exception zipex) { Growl.Error(zipex.Message); }
                        }
                        locpackdata.EntriesCount = count;
                        locpackdata.Data         = jsons;
                        list.Add(locpackdata);
                    }
                    catch (Exception ex) { Growl.Error(ex.Message); }
                }
            }
            return(list);
        }
        public async void Login2()
        {
            BtnLoginEnable = false;

            if (Settings.Username.IsBlank() || Settings.Password.IsBlank())
            {
                Growl.Error("Username or password is err!", Global.TOKEN_LOGIN);
                goto RETURN_POINT;
            }

            //Proxy
            HttpHelper.ProxyInfo PROXY = Settings.ProxyEnable ? new HttpHelper.ProxyInfo(Settings.ProxyHost, Settings.ProxyPort, Settings.ProxyUser, Settings.ProxyPwd) : null;

            //token
            (string token1, string token2) = await GetToken();

            //Login (lossless key \ video key)
            (string msg, LoginKey key) = await Client.Login(Settings.Username, Settings.Password, token1, PROXY);

            (string msg3, LoginKey key3) = await Client.Login(Settings.Username, Settings.Password, token2, PROXY);

            if (msg.IsNotBlank() || key == null)
            {
                Growl.Error("Login Err! " + msg, Global.TOKEN_LOGIN);
                goto RETURN_POINT;
            }

            //Auto get accesstoken(master key)
            string printSuccess = null;
            string printWarning = null;

            (string msg2, LoginKey key2) = Client.GetAccessTokenFromTidalDesktop(key.UserID);
            if (key2 != null && msg2.IsBlank() && key2.AccessToken != Settings.Accesstoken)
            {
                (msg2, key2) = await Client.Login(key2.AccessToken, PROXY);

                if (msg2.IsBlank() && key2 != null)
                {
                    printSuccess         = "Auto get accesstoken success!";
                    Settings.Accesstoken = key2.AccessToken;
                }
            }
            else
            {
                key2 = null;
            }

            if (key2 == null && Settings.Accesstoken.IsNotBlank())
            {
                (msg2, key2) = await Client.Login(Settings.Accesstoken, PROXY);

                if (msg2.IsNotBlank() || key2 == null)
                {
                    printWarning = "Accesstoken is not valid! " + msg;
                }
            }

            if (!Settings.Remember)
            {
                Settings.Password = null;
            }
            Settings.Userid      = key.UserID;
            Settings.Sessionid1  = key.SessionID;
            Settings.Accesstoken = Settings.Accesstoken;
            Settings.Save();
            Global.CommonKey = key;
            Global.VideoKey  = key3;
            Global.AccessKey = key2;

            Manager.ShowWindow(VMMain);
            if (printSuccess.IsNotBlank())
            {
                Growl.Success(printSuccess, Global.TOKEN_MAIN);
            }
            else if (printWarning.IsNotBlank())
            {
                Growl.Warning(printWarning, Global.TOKEN_MAIN);
            }

            RequestClose();

RETURN_POINT:
            BtnLoginEnable = true;
            return;
        }
Esempio n. 21
0
        public void showGrowlNotification(string NotificationKEY, bool isAvailableOrSuccess = false, params string[] param)
        {
            //Delete Confirm
            if (NotificationKEY.Equals(AppVariable.Delete_Confirm_KEY))
            {
                Growl.Warning(new GrowlInfo
                {
                    Message           = $"آیا برای حذف {param[1]} {param[0]} اطمینان دارید؟",
                    CancelStr         = "انصراف",
                    ConfirmStr        = "بله",
                    ShowDateTime      = false,
                    ActionBeforeClose = isConfirm =>
                    {
                        if (isConfirm)
                        {
                            switch (param[1])
                            {
                            case "مدرسه":
                                AddSchoolView.main.deleteSchool();
                                break;

                            case "دانش آموز":
                                AddStudentView.main.deleteStudent();
                                break;

                            case "کاربر":
                                AddUserView.main.deleteUser();
                                break;

                            case "حضورغیاب":
                                AttendancelistView.main.deleteAttendance();
                                break;

                            case "نمره":
                                QuestionsListView.main.deleteScore();
                                break;

                            case "گروه":
                                AddAzmonGroupView.main.deleteGroup();
                                break;

                            case "سوال":
                                AddQuestionsView.main.deleteGroup();
                                break;
                            }
                        }
                        return(true);
                    }
                });
            }
            //Reset Data Confirm
            else if (NotificationKEY.Equals(AppVariable.Reset_Data_Confirm_KEY))
            {
                Growl.Warning(new GrowlInfo
                {
                    Message      = $"آیا برای بازیابی {param[0]} اطمینان دارید؟",
                    CancelStr    = "انصراف",
                    ConfirmStr   = "بله",
                    ShowDateTime = false,

                    ActionBeforeClose = isConfirm =>
                    {
                        if (isConfirm)
                        {
                            if (param[0] == "تنظیمات برنامه")
                            {
                                SettingsView.main.resetConfig();
                            }
                            else
                            {
                                SettingsView.main.resetDatabase();
                            }
                        }
                        return(true);
                    }
                });
            }

            //Reset Data Deleted
            else if (NotificationKEY.Equals(AppVariable.Data_Reset_Deleted_KEY))
            {
                Growl.Ask(new GrowlInfo
                {
                    Message           = $"{param[0]} به حالت پیشفرض تغییر یافت، برنامه را دوباره راه اندازی کنید",
                    CancelStr         = "انصراف",
                    ConfirmStr        = "راه اندازی",
                    ShowDateTime      = false,
                    ActionBeforeClose = isConfirm =>
                    {
                        if (isConfirm)
                        {
                            Application.Current.Shutdown();
                            System.Windows.Forms.Application.Restart();
                        }
                        return(true);
                    }
                });
            }

            //Password Same
            else if (NotificationKEY.Equals(AppVariable.Same_Password_KEY))
            {
                Growl.Warning(new GrowlInfo {
                    Message = "رمز های عبور باید یکسان باشند", ShowDateTime = false
                });
            }

            //Delete Exist
            else if (NotificationKEY.Equals(AppVariable.Delete_Exist_KEY))
            {
                Growl.Warning(new GrowlInfo {
                    Message = $"نمی توان این {param[0]} را حذف کرد، ابتدا {param[1]} این {param[0]} را حذف کنید", ShowDateTime = false
                });
            }

            //Azmon
            else if (NotificationKEY.Equals(AppVariable.Azmon_KEY))
            {
                Growl.Warning(new GrowlInfo {
                    Message = "تعداد سوالات وارد شده بیشتر از سوالات موجود است", ShowDateTime = false
                });
            }

            //Fill All Data
            else if (NotificationKEY.Equals(AppVariable.Fill_All_Data_KEY))
            {
                Growl.Warning(new GrowlInfo {
                    Message = "لطفا تمام فیلدها را پر کنید", ShowDateTime = false
                });
            }

            //No Data
            else if (NotificationKEY.Equals(AppVariable.No_Data_KEY))
            {
                var navigationService = NavigationServiceProvider.GetNavigationServiceInstance();

                Growl.Error(new GrowlInfo
                {
                    Message           = "اطلاعاتی در پایگاه داده یافت نشد",
                    CancelStr         = "انصراف",
                    ConfirmStr        = "ثبت اطلاعات جدید",
                    ShowDateTime      = false,
                    ActionBeforeClose = isConfirm =>
                    {
                        if (isConfirm)
                        {
                            switch (param[0])
                            {
                            case "School":
                                AddSchoolView.main.tabc.SelectedIndex = 0;
                                break;

                            case "User":
                                AddUserView.main.tabc.SelectedIndex = 0;
                                break;

                            case "Student":
                                AddStudentView.main.tabc.SelectedIndex = 0;
                                break;

                            case "Attendance":
                                AttendancelistView.main.tabc.SelectedIndex = 0;
                                break;

                            case "Question":
                                navigationService.GetController <UserControls.UserControlsController>().AddStudent();
                                break;

                            case "Score":
                                QuestionsListView.main.tabc.SelectedIndex = 0;
                                break;

                            case "TopStudent":
                                navigationService.GetController <UserControls.UserControlsController>().Questionslist();
                                break;

                            case "Group":
                                AddAzmonGroupView.main.tabc.SelectedIndex = 0;
                                break;

                            case "AQuestions":
                                AddQuestionsView.main.tabc.SelectedIndex = 0;
                                break;
                            }
                        }
                        return(true);
                    }
                });
            }

            //Backup
            else if (NotificationKEY.Equals(AppVariable.Backup_KEY))
            {
                if (isAvailableOrSuccess)
                {
                    Growl.Success(new GrowlInfo {
                        Message = $"{param[0]} با موفقیت انجام شد", ShowDateTime = false
                    });
                }
                else
                {
                    Growl.Error(new GrowlInfo {
                        Message = $"{param[0]} با مشکل مواجه شد", ShowDateTime = false
                    });
                }
            }

            //Circular
            else if (NotificationKEY.Equals(AppVariable.Recived_Circular_KEY))
            {
                if (isAvailableOrSuccess)
                {
                    Growl.Success(new GrowlInfo {
                        Message = "تمامی بخشنامه ها با موفقیت دریافت شد", ShowDateTime = false
                    });
                }
                else
                {
                    Growl.Error(new GrowlInfo {
                        Message = "درحال حاظر سرور در دسترس نیست! لطفا در صورت فعال بودن، VPN خود را غیرفعال کنید", ShowDateTime = false
                    });
                }
            }

            //Update Data
            else if (NotificationKEY.Equals(AppVariable.Update_Data_KEY))
            {
                if (isAvailableOrSuccess)
                {
                    Growl.Success(new GrowlInfo {
                        Message = $"{param[1]} {param[0]} با موفقیت ویرایش شد", ShowDateTime = false
                    });
                }
                else
                {
                    Growl.Error(new GrowlInfo {
                        Message = $"ویرایش {param[1]} {param[0]} با خطا مواجه شد", ShowDateTime = false
                    });
                }
            }

            //Deleted
            else if (NotificationKEY.Equals(AppVariable.Deleted_KEY))
            {
                if (isAvailableOrSuccess)
                {
                    Growl.Success(new GrowlInfo {
                        Message = $"{param[1]} {param[0]} با موفقیت حذف شد", ShowDateTime = false
                    });
                }
                else
                {
                    Growl.Error(new GrowlInfo {
                        Message = $"حذف {param[1]} {param[0]} با خطا مواجه شد", ShowDateTime = false
                    });
                }
            }

            //Add Data
            else if (NotificationKEY.Equals(AppVariable.Add_Data_KEY))
            {
                if (isAvailableOrSuccess)
                {
                    Growl.Success(new GrowlInfo {
                        Message = $"{param[1]} {param[0]} با موفقیت ثبت شد", ShowDateTime = false
                    });
                }
                else
                {
                    Growl.Error(new GrowlInfo {
                        Message = $"ثبت {param[1]} {param[0]} با خطا مواجه شد", ShowDateTime = false
                    });
                }
            }

            //Update
            else if (NotificationKEY.Equals(AppVariable.Update_KEY))
            {
                if (isAvailableOrSuccess)
                {
                    Growl.Info(new GrowlInfo
                    {
                        Message           = $"نسخه جدید {param[0]} پیدا شد،همین حالا به آخرین نسخه بروزرسانی کنید",
                        CancelStr         = "انصراف",
                        ConfirmStr        = "دانلود",
                        ShowDateTime      = false,
                        ActionBeforeClose = isConfirm =>
                        {
                            if (isConfirm)
                            {
                                System.Diagnostics.Process.Start(param[1]);
                            }

                            return(true);
                        }
                    });
                }
                else
                {
                    Growl.Error(new GrowlInfo {
                        Message = $"شما از آخرین نسخه {AppVariable.getAppVersion} استفاده می کنید", ShowDateTime = false
                    });
                }
            }
        }