Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikitosiki committed May 5, 2023
1 parent 993d2f9 commit 13b97d4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
10 changes: 3 additions & 7 deletions SkillCourse/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,11 @@ public MainForm()


//Random();
//SubscriptionCourse sub = new SubscriptionCourse(3, 101);
//SkillCourseDB.Instance.Subscriptions.Add(sub);
//SubscriptionCourse sub2 = new SubscriptionCourse(2, 101);
//SkillCourseDB.Instance.Subscriptions.Add(sub2);
//Certificate certificate = new Certificate("По завершению долгожданного...", DateTime.Now, 1, 3, 99);
//Certificate certificate = new Certificate("По завершению долгожданного...", DateTime.Now, 3, 1, 1);
//SkillCourseDB.Instance.Certificates.Add(certificate);
//Certificate certificate1 = new Certificate("Ты снова пришёл сюда?", DateTime.Now, 5, 3, 98);
//Certificate certificate1 = new Certificate("Ты снова пришёл сюда?", DateTime.Now, 3, 1, 2);
//SkillCourseDB.Instance.Certificates.Add(certificate1);
//Certificate certificate2 = new Certificate("Я думал, мы это уже обговорили, проваливай", DateTime.Now, 1, 3, 17);
//Certificate certificate2 = new Certificate("Я думал, мы это уже обговорили, проваливай", DateTime.Now, 8, 1, 4);
//SkillCourseDB.Instance.Certificates.Add(certificate2);
//SubscriptionCourse sub = new SubscriptionCourse(4, 101);
//SkillCourseDB.Instance.Subscriptions.Add(sub);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Component_CreateCourse_Naming()
Dock = DockStyle.Fill;

int maxLenghtName = UserTextSize.Course.maxLenghtName;
int maxLenghtDescription = UserTextSize.Course.maxLenghtName;
int maxLenghtDescription = UserTextSize.Course.maxLenghtDescription;
textBoxName.MaxLength = maxLenghtName;
textBoxDescription.MaxLength = maxLenghtDescription;
label2.Text = "0 / " + maxLenghtName;
Expand All @@ -59,7 +59,7 @@ private void textBoxName_TextChanged(object sender, EventArgs e)
private void textBoxDescription_TextChanged(object sender, EventArgs e)
{
ValidityCheckName(textBoxDescription);
int maxLenghtDescription = UserTextSize.Course.maxLenghtName;
int maxLenghtDescription = UserTextSize.Course.maxLenghtDescription;
label4.Text = textBoxDescription.Text.Length.ToString() + " / " + maxLenghtDescription;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public PanelMainBlock_Message_NoCourses()
private void buttonAdd_Click(object sender, EventArgs e)
{
if (AccountHandler.Instance.UserLog is Student stud)
StudentButtonEvents.Course_SubscribedClick();
StudentButtonEvents.Course_PublicClick();

if (AccountHandler.Instance.UserLog is Teather teac)
TeacherButtonEvents.Course_CreateClick();
Expand Down
5 changes: 3 additions & 2 deletions SkillCourse/Panels/MainBlock/PanelMainBlock_Courses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ private UserControl CreateCourseForStudent(Course course)
//Если пользователь на странице подписок, с возможностью зайти на курс
if (VisibleButView && VisibleButSub)
{
return new Component_BriefСourse_View_Sub(course, true,
() => NavigatePages.OpenNextPage(new PanelMainBlock_CoursePage(course)),
// return new Component_BriefСourse_View_Sub(course, true,
//() => NavigatePages.OpenNextPage(new PanelMainBlock_CoursePage(course)),
return new Component_BriefСourse_Subscription(course, true,
() =>
{
if (!((Student)handlerUser).SubscripToCourse(course))
Expand Down

0 comments on commit 13b97d4

Please sign in to comment.