public MainPage() { InitializeComponent(); windowProperties = new WindowProperties(Top, Left, Height, Width, WindowState); this.titleBar = new TitleBar(this); this.database = new Database(); Page_logIn = new LogIn_SignIn(this, this.database, windowProperties); Page_logIn.Show(); this.Hide(); }
public ShowAndEditNote(MainPage homePage, Database database, int userID, WindowProperties windowProperties) { InitializeComponent(); this.windowProperties = windowProperties; titleBar = new TitleBar(this, homePage); this.homePage = homePage; this.database = database; this.userID = userID; newNoteFlage = true; textBox_Title.Text = "تیتر را وارد کنید"; noteTextChangedFlag = false; noteTitleChangedFlag = false; CheckNoteChanges(); }
public LogIn_SignIn(MainPage homePage, Database database, WindowProperties windowProperties) { InitializeComponent(); this.windowProperties = windowProperties; titleBar = new TitleBar(this, homePage); this.homePage = homePage; this.database = database; isLogIn = true; listErrors = new List <Error> { new Error("LogIn_Username", ErrorMessage.required), new Error("LogIn_Password", ErrorMessage.required) }; button_LogIn_Submit.IsEnabled = false; }
public ShowAndEditNote(MainPage homePage, Database database, int noteID, string noteTitle, string noteText, WindowProperties windowProperties) { InitializeComponent(); this.windowProperties = windowProperties; titleBar = new TitleBar(this, homePage); this.homePage = homePage; this.database = database; this.noteID = noteID; this.noteTitle = noteTitle == "null" ? "تیتر را وارد کنید" : noteTitle; this.noteText = noteText == "null" ? null : noteText; newNoteFlage = false; textBox_Title.Text = this.noteTitle; richTextBox_Note.Document.Blocks.Clear(); richTextBox_Note.Document.Blocks.Add(new Paragraph(new Run(this.noteText))); noteTextChangedFlag = false; noteTitleChangedFlag = false; CheckNoteChanges(); }