From 6284ea7efd4446ea437135f459808b6e0941eaca Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Fri, 4 Dec 2020 13:03:54 +0330 Subject: [PATCH] removing unused forms --- .../NarrationProfile.Designer.cs | 263 ------------------ ganjoor/Audio Support/NarrationProfile.cs | 108 ------- ganjoor/Audio Support/NarrationProfile.resx | 123 -------- .../NarrationProfiles.Designer.cs | 145 ---------- ganjoor/Audio Support/NarrationProfiles.cs | 121 -------- ganjoor/Audio Support/NarrationProfiles.resx | 187 ------------- .../UploadedNarrations.Designer.cs | 122 -------- ganjoor/Audio Support/UploadedNarrations.cs | 53 ---- ganjoor/Audio Support/UploadedNarrations.resx | 120 -------- ganjoor/ganjoor.csproj | 27 -- 10 files changed, 1269 deletions(-) delete mode 100644 ganjoor/Audio Support/NarrationProfile.Designer.cs delete mode 100644 ganjoor/Audio Support/NarrationProfile.cs delete mode 100644 ganjoor/Audio Support/NarrationProfile.resx delete mode 100644 ganjoor/Audio Support/NarrationProfiles.Designer.cs delete mode 100644 ganjoor/Audio Support/NarrationProfiles.cs delete mode 100644 ganjoor/Audio Support/NarrationProfiles.resx delete mode 100644 ganjoor/Audio Support/UploadedNarrations.Designer.cs delete mode 100644 ganjoor/Audio Support/UploadedNarrations.cs delete mode 100644 ganjoor/Audio Support/UploadedNarrations.resx diff --git a/ganjoor/Audio Support/NarrationProfile.Designer.cs b/ganjoor/Audio Support/NarrationProfile.Designer.cs deleted file mode 100644 index bdeb818..0000000 --- a/ganjoor/Audio Support/NarrationProfile.Designer.cs +++ /dev/null @@ -1,263 +0,0 @@ -namespace ganjoor.Audio_Support -{ - partial class NarrationProfile - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NarrationProfile)); - this.lblName = new System.Windows.Forms.Label(); - this.txtName = new System.Windows.Forms.TextBox(); - this.lblUrl = new System.Windows.Forms.Label(); - this.txtAudioArtistUrl = new System.Windows.Forms.TextBox(); - this.txtAudioSrc = new System.Windows.Forms.TextBox(); - this.lblAudioSrc = new System.Windows.Forms.Label(); - this.txtAudioSrcUrl = new System.Windows.Forms.TextBox(); - this.lblAudioSrcUrl = new System.Windows.Forms.Label(); - this.chkDefault = new System.Windows.Forms.CheckBox(); - this.txtFileSuffixWithoutDash = new System.Windows.Forms.TextBox(); - this.lblFileSuffixWithoutDash = new System.Windows.Forms.Label(); - this.lblSuffix = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.btnOK = new System.Windows.Forms.Button(); - this.btnCancel = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // lblName - // - this.lblName.AutoSize = true; - this.lblName.Location = new System.Drawing.Point(18, 38); - this.lblName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblName.Name = "lblName"; - this.lblName.Size = new System.Drawing.Size(117, 21); - this.lblName.TabIndex = 0; - this.lblName.Text = "* نام خوانشگر:"; - // - // txtName - // - this.txtName.Location = new System.Drawing.Point(129, 33); - this.txtName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.txtName.Name = "txtName"; - this.txtName.Size = new System.Drawing.Size(510, 27); - this.txtName.TabIndex = 1; - // - // lblUrl - // - this.lblUrl.AutoSize = true; - this.lblUrl.Location = new System.Drawing.Point(18, 80); - this.lblUrl.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblUrl.Name = "lblUrl"; - this.lblUrl.Size = new System.Drawing.Size(92, 21); - this.lblUrl.TabIndex = 2; - this.lblUrl.Text = "نشانی وب:"; - // - // txtAudioArtistUrl - // - this.txtAudioArtistUrl.Location = new System.Drawing.Point(129, 75); - this.txtAudioArtistUrl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.txtAudioArtistUrl.Name = "txtAudioArtistUrl"; - this.txtAudioArtistUrl.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.txtAudioArtistUrl.Size = new System.Drawing.Size(510, 27); - this.txtAudioArtistUrl.TabIndex = 3; - // - // txtAudioSrc - // - this.txtAudioSrc.Location = new System.Drawing.Point(129, 171); - this.txtAudioSrc.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.txtAudioSrc.Name = "txtAudioSrc"; - this.txtAudioSrc.Size = new System.Drawing.Size(510, 27); - this.txtAudioSrc.TabIndex = 5; - // - // lblAudioSrc - // - this.lblAudioSrc.AutoSize = true; - this.lblAudioSrc.Location = new System.Drawing.Point(18, 177); - this.lblAudioSrc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblAudioSrc.Name = "lblAudioSrc"; - this.lblAudioSrc.Size = new System.Drawing.Size(102, 21); - this.lblAudioSrc.TabIndex = 4; - this.lblAudioSrc.Text = "منبع خوانش:"; - // - // txtAudioSrcUrl - // - this.txtAudioSrcUrl.Location = new System.Drawing.Point(129, 216); - this.txtAudioSrcUrl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.txtAudioSrcUrl.Name = "txtAudioSrcUrl"; - this.txtAudioSrcUrl.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.txtAudioSrcUrl.Size = new System.Drawing.Size(510, 27); - this.txtAudioSrcUrl.TabIndex = 7; - // - // lblAudioSrcUrl - // - this.lblAudioSrcUrl.AutoSize = true; - this.lblAudioSrcUrl.Location = new System.Drawing.Point(18, 220); - this.lblAudioSrcUrl.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblAudioSrcUrl.Name = "lblAudioSrcUrl"; - this.lblAudioSrcUrl.Size = new System.Drawing.Size(102, 21); - this.lblAudioSrcUrl.TabIndex = 6; - this.lblAudioSrcUrl.Text = "نشانی منبع:"; - // - // chkDefault - // - this.chkDefault.AutoSize = true; - this.chkDefault.Location = new System.Drawing.Point(129, 392); - this.chkDefault.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.chkDefault.Name = "chkDefault"; - this.chkDefault.Size = new System.Drawing.Size(143, 25); - this.chkDefault.TabIndex = 10; - this.chkDefault.Text = "نمایهٔ پیش‌فرض"; - this.chkDefault.UseVisualStyleBackColor = true; - // - // txtFileSuffixWithoutDash - // - this.txtFileSuffixWithoutDash.Location = new System.Drawing.Point(129, 261); - this.txtFileSuffixWithoutDash.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.txtFileSuffixWithoutDash.Name = "txtFileSuffixWithoutDash"; - this.txtFileSuffixWithoutDash.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.txtFileSuffixWithoutDash.Size = new System.Drawing.Size(510, 27); - this.txtFileSuffixWithoutDash.TabIndex = 9; - // - // lblFileSuffixWithoutDash - // - this.lblFileSuffixWithoutDash.AutoSize = true; - this.lblFileSuffixWithoutDash.Location = new System.Drawing.Point(18, 264); - this.lblFileSuffixWithoutDash.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblFileSuffixWithoutDash.Name = "lblFileSuffixWithoutDash"; - this.lblFileSuffixWithoutDash.Size = new System.Drawing.Size(75, 21); - this.lblFileSuffixWithoutDash.TabIndex = 8; - this.lblFileSuffixWithoutDash.Text = "* پسوند:"; - // - // lblSuffix - // - this.lblSuffix.Location = new System.Drawing.Point(129, 302); - this.lblSuffix.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblSuffix.Name = "lblSuffix"; - this.lblSuffix.Size = new System.Drawing.Size(512, 88); - this.lblSuffix.TabIndex = 11; - this.lblSuffix.Text = resources.GetString("lblSuffix.Text"); - // - // label1 - // - this.label1.Location = new System.Drawing.Point(129, 114); - this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(512, 52); - this.label1.TabIndex = 12; - this.label1.Text = "اگر خوانشهای آزاد در دسترسی را همگام کرده‌اید می‌توانید از دو کادر زیر برای ورود " + - "اطلاعات اضافی استفاده کنید:"; - // - // label2 - // - this.label2.Location = new System.Drawing.Point(129, 4); - this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(512, 24); - this.label2.TabIndex = 13; - this.label2.Text = "* ستاره‌دارها اجباری هستند."; - // - // btnOK - // - this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOK.Location = new System.Drawing.Point(129, 428); - this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(112, 34); - this.btnOK.TabIndex = 11; - this.btnOK.Text = "تأیید"; - this.btnOK.UseVisualStyleBackColor = true; - this.btnOK.Click += new System.EventHandler(this.btnOK_ClickAsync); - // - // btnCancel - // - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(250, 428); - this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(112, 34); - this.btnCancel.TabIndex = 12; - this.btnCancel.Text = "انصراف"; - this.btnCancel.UseVisualStyleBackColor = true; - // - // NarrationProfile - // - this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(144F, 144F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(674, 480); - this.Controls.Add(this.btnCancel); - this.Controls.Add(this.btnOK); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.lblSuffix); - this.Controls.Add(this.txtFileSuffixWithoutDash); - this.Controls.Add(this.lblFileSuffixWithoutDash); - this.Controls.Add(this.chkDefault); - this.Controls.Add(this.txtAudioSrcUrl); - this.Controls.Add(this.lblAudioSrcUrl); - this.Controls.Add(this.txtAudioSrc); - this.Controls.Add(this.lblAudioSrc); - this.Controls.Add(this.txtAudioArtistUrl); - this.Controls.Add(this.lblUrl); - this.Controls.Add(this.txtName); - this.Controls.Add(this.lblName); - this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "NarrationProfile"; - this.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.RightToLeftLayout = true; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "نمایهٔ خوانش"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label lblName; - private System.Windows.Forms.TextBox txtName; - private System.Windows.Forms.Label lblUrl; - private System.Windows.Forms.TextBox txtAudioArtistUrl; - private System.Windows.Forms.TextBox txtAudioSrc; - private System.Windows.Forms.Label lblAudioSrc; - private System.Windows.Forms.TextBox txtAudioSrcUrl; - private System.Windows.Forms.Label lblAudioSrcUrl; - private System.Windows.Forms.CheckBox chkDefault; - private System.Windows.Forms.TextBox txtFileSuffixWithoutDash; - private System.Windows.Forms.Label lblFileSuffixWithoutDash; - private System.Windows.Forms.Label lblSuffix; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Button btnOK; - private System.Windows.Forms.Button btnCancel; - } -} \ No newline at end of file diff --git a/ganjoor/Audio Support/NarrationProfile.cs b/ganjoor/Audio Support/NarrationProfile.cs deleted file mode 100644 index b8f62eb..0000000 --- a/ganjoor/Audio Support/NarrationProfile.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using System.Net; -using System.Net.Http; -using System.Net.Http.Formatting; -using System.Net.Http.Headers; -using System.Windows.Forms; - -namespace ganjoor.Audio_Support -{ - public partial class NarrationProfile : Form - { - public NarrationProfile(UserNarrationProfileViewModel editingRecord = null) - { - InitializeComponent(); - _editingRecord = editingRecord; - if(_editingRecord != null) - { - txtName.Text = _editingRecord.ArtistName; - txtFileSuffixWithoutDash.Text = _editingRecord.FileSuffixWithoutDash; - txtAudioArtistUrl.Text = _editingRecord.ArtistUrl; - txtAudioSrc.Text = _editingRecord.AudioSrc; - txtAudioArtistUrl.Text = _editingRecord.AudioSrcUrl; - chkDefault.Checked = _editingRecord.IsDefault; - - } - } - - UserNarrationProfileViewModel _editingRecord; - - private async void btnOK_ClickAsync(object sender, EventArgs e) - { - - - if(_editingRecord == null) //جدید - { - UserNarrationProfileViewModel newRecord = new UserNarrationProfileViewModel() - { - ArtistName = txtName.Text, - FileSuffixWithoutDash = txtFileSuffixWithoutDash.Text, - ArtistUrl = txtAudioArtistUrl.Text, - AudioSrc = txtAudioSrc.Text, - AudioSrcUrl = txtAudioSrcUrl.Text, - IsDefault = chkDefault.Checked - - }; - - using (HttpClient httpClient = new HttpClient()) - { - httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Properties.Settings.Default.MuseumToken); - - Cursor = Cursors.WaitCursor; - Application.DoEvents(); - - HttpResponseMessage response = await httpClient.PostAsync - ( - $"{Properties.Settings.Default.GanjoorServiceUrl}/api/audio/profile", - newRecord, - new JsonMediaTypeFormatter() - ); - if (response.StatusCode != HttpStatusCode.OK) - { - Cursor = Cursors.Default; - MessageBox.Show(response.ToString()); - DialogResult = DialogResult.None; - return; - } - - } - Cursor = Cursors.Default; - } - else - { - _editingRecord.ArtistName = txtName.Text; - _editingRecord.FileSuffixWithoutDash = txtFileSuffixWithoutDash.Text; - _editingRecord.ArtistUrl = txtAudioArtistUrl.Text; - _editingRecord.AudioSrc = txtAudioSrc.Text; - _editingRecord.AudioSrcUrl = txtAudioArtistUrl.Text; - _editingRecord.IsDefault = chkDefault.Checked; - - using (HttpClient httpClient = new HttpClient()) - { - httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Properties.Settings.Default.MuseumToken); - - Cursor = Cursors.WaitCursor; - Application.DoEvents(); - - HttpResponseMessage response = await httpClient.PutAsync - ( - $"{Properties.Settings.Default.GanjoorServiceUrl}/api/audio/profile", - _editingRecord, - new JsonMediaTypeFormatter() - ); - if (response.StatusCode != HttpStatusCode.OK) - { - Cursor = Cursors.Default; - MessageBox.Show(response.ToString()); - DialogResult = DialogResult.None; - return; - } - - } - Cursor = Cursors.Default; - } - - - } - } -} diff --git a/ganjoor/Audio Support/NarrationProfile.resx b/ganjoor/Audio Support/NarrationProfile.resx deleted file mode 100644 index df58ea9..0000000 --- a/ganjoor/Audio Support/NarrationProfile.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - نام فایلها روی سرور ترکیبی از شناسهٔ شعر و این پسوند خواهد بود. می‌توانید حروف ابتدایی نام و نام خانوادگیتان را به انگلیسی وارد کنید. در هنگام بروز تداخل اعدادی به انتهای این پسوند اضافه می‌شود. در کل زیاد نگران آن نباشید! - - \ No newline at end of file diff --git a/ganjoor/Audio Support/NarrationProfiles.Designer.cs b/ganjoor/Audio Support/NarrationProfiles.Designer.cs deleted file mode 100644 index 388f11d..0000000 --- a/ganjoor/Audio Support/NarrationProfiles.Designer.cs +++ /dev/null @@ -1,145 +0,0 @@ -namespace ganjoor.Audio_Support -{ - partial class NarrationProfiles - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NarrationProfiles)); - this.lblMsg = new System.Windows.Forms.Label(); - this.tlbr = new System.Windows.Forms.ToolStrip(); - this.btnAdd = new System.Windows.Forms.ToolStripButton(); - this.btnUpdate = new System.Windows.Forms.ToolStripButton(); - this.grd = new System.Windows.Forms.DataGridView(); - this.btnDelete = new System.Windows.Forms.ToolStripButton(); - this.tlbr.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.grd)).BeginInit(); - this.SuspendLayout(); - // - // lblMsg - // - this.lblMsg.BackColor = System.Drawing.SystemColors.Window; - this.lblMsg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.lblMsg.Dock = System.Windows.Forms.DockStyle.Top; - this.lblMsg.Location = new System.Drawing.Point(0, 0); - this.lblMsg.Name = "lblMsg"; - this.lblMsg.Size = new System.Drawing.Size(800, 67); - this.lblMsg.TabIndex = 10; - this.lblMsg.Text = resources.GetString("lblMsg.Text"); - this.lblMsg.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // tlbr - // - this.tlbr.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tlbr.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; - this.tlbr.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.btnAdd, - this.btnUpdate, - this.btnDelete}); - this.tlbr.Location = new System.Drawing.Point(0, 67); - this.tlbr.Name = "tlbr"; - this.tlbr.Size = new System.Drawing.Size(800, 31); - this.tlbr.TabIndex = 11; - this.tlbr.Text = "نوار ابزار"; - // - // btnAdd - // - this.btnAdd.Image = ((System.Drawing.Image)(resources.GetObject("btnAdd.Image"))); - this.btnAdd.ImageTransparentColor = System.Drawing.Color.Magenta; - this.btnAdd.Name = "btnAdd"; - this.btnAdd.Size = new System.Drawing.Size(109, 26); - this.btnAdd.Text = "نمایهٔ جدید"; - this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); - // - // btnUpdate - // - this.btnUpdate.Image = ((System.Drawing.Image)(resources.GetObject("btnUpdate.Image"))); - this.btnUpdate.ImageTransparentColor = System.Drawing.Color.Magenta; - this.btnUpdate.Name = "btnUpdate"; - this.btnUpdate.Size = new System.Drawing.Size(125, 26); - this.btnUpdate.Text = "ویرایش نمایه"; - this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click); - // - // grd - // - this.grd.AllowUserToAddRows = false; - this.grd.AllowUserToDeleteRows = false; - this.grd.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.grd.Dock = System.Windows.Forms.DockStyle.Fill; - this.grd.Location = new System.Drawing.Point(0, 98); - this.grd.MultiSelect = false; - this.grd.Name = "grd"; - this.grd.ReadOnly = true; - this.grd.RowHeadersWidth = 62; - this.grd.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.grd.Size = new System.Drawing.Size(800, 352); - this.grd.TabIndex = 12; - this.grd.CellContentDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.grd_CellContentDoubleClick); - // - // btnDelete - // - this.btnDelete.Image = ((System.Drawing.Image)(resources.GetObject("btnDelete.Image"))); - this.btnDelete.ImageTransparentColor = System.Drawing.Color.Magenta; - this.btnDelete.Name = "btnDelete"; - this.btnDelete.Size = new System.Drawing.Size(110, 26); - this.btnDelete.Text = "حذف نمایه"; - this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); - // - // NarrationProfiles - // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Controls.Add(this.grd); - this.Controls.Add(this.tlbr); - this.Controls.Add(this.lblMsg); - this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(178))); - this.Name = "NarrationProfiles"; - this.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.RightToLeftLayout = true; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "نمایه‌های خوانش"; - this.Load += new System.EventHandler(this.NarrationProfiles_Load); - this.tlbr.ResumeLayout(false); - this.tlbr.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.grd)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label lblMsg; - private System.Windows.Forms.ToolStrip tlbr; - private System.Windows.Forms.DataGridView grd; - private System.Windows.Forms.ToolStripButton btnAdd; - private System.Windows.Forms.ToolStripButton btnUpdate; - private System.Windows.Forms.ToolStripButton btnDelete; - } -} \ No newline at end of file diff --git a/ganjoor/Audio Support/NarrationProfiles.cs b/ganjoor/Audio Support/NarrationProfiles.cs deleted file mode 100644 index f606564..0000000 --- a/ganjoor/Audio Support/NarrationProfiles.cs +++ /dev/null @@ -1,121 +0,0 @@ -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ganjoor.Audio_Support -{ - public partial class NarrationProfiles : Form - { - public NarrationProfiles() - { - InitializeComponent(); - } - - private async Task LoadProfiles() - { - using (HttpClient httpClient = new HttpClient()) - { - httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Properties.Settings.Default.MuseumToken); - - Cursor = Cursors.WaitCursor; - Application.DoEvents(); - - HttpResponseMessage response = await httpClient.GetAsync($"{Properties.Settings.Default.GanjoorServiceUrl}/api/audio/profile"); - if (response.StatusCode != HttpStatusCode.OK) - { - Cursor = Cursors.Default; - MessageBox.Show(response.ToString()); - return; - } - - grd.DataSource = await response.Content.ReadAsAsync(); - - } - Cursor = Cursors.Default; - } - - private async void NarrationProfiles_Load(object sender, EventArgs e) - { - await LoadProfiles(); - } - - private async void btnAdd_Click(object sender, EventArgs e) - { - using(NarrationProfile dlg = new NarrationProfile()) - { - if(dlg.ShowDialog(this) == DialogResult.OK) - { - await LoadProfiles(); - } - } - } - - private async Task UpdateProfile() - { - if (grd.SelectedRows.Count != 1) - { - MessageBox.Show("لطفا ردیفی را انتخاب کنید."); - return; - } - using (NarrationProfile dlg = new NarrationProfile((grd.SelectedRows[0].DataBoundItem as JObject).ToObject())) - { - if (dlg.ShowDialog(this) == DialogResult.OK) - { - await LoadProfiles(); - } - } - } - private async void btnUpdate_Click(object sender, EventArgs e) - { - await UpdateProfile(); - } - - private async void btnDelete_Click(object sender, EventArgs e) - { - if (grd.SelectedRows.Count != 1) - { - MessageBox.Show("لطفا ردیفی را انتخاب کنید."); - return; - } - - if(MessageBox.Show($"آیا از حذف نمایهٔ انتخاب شده ({(grd.SelectedRows[0].DataBoundItem as JObject).ToObject().ArtistName}) اطمینان دارید؟", "تأییدیه", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign) == DialogResult.Yes) - { - using (HttpClient httpClient = new HttpClient()) - { - httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Properties.Settings.Default.MuseumToken); - - Cursor = Cursors.WaitCursor; - Application.DoEvents(); - - HttpResponseMessage response = await httpClient.DeleteAsync( - $"{Properties.Settings.Default.GanjoorServiceUrl}/api/audio/profile/{(grd.SelectedRows[0].DataBoundItem as JObject).ToObject().Id}" - ); - if (response.StatusCode != HttpStatusCode.OK) - { - Cursor = Cursors.Default; - MessageBox.Show(response.ToString()); - return; - } - } - Cursor = Cursors.Default; - - await LoadProfiles(); - } - } - - private async void grd_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) - { - await UpdateProfile(); - } - } -} diff --git a/ganjoor/Audio Support/NarrationProfiles.resx b/ganjoor/Audio Support/NarrationProfiles.resx deleted file mode 100644 index 2154450..0000000 --- a/ganjoor/Audio Support/NarrationProfiles.resx +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - نمایه‌های خوانش به شما کمک می‌کنند اطلاعاتی مانند نام خوانشگر و نشانی وب‌سایت او را یک جا وارد کنید و به طور خودکار در خوانشهای بارگذاری شده استفاده شود. توجه فرمایید که در هنگام پردازش خوانش به نمایهٔ پیش‌فرض مراجعه می‌شود و تعیین نمایهٔ پیش‌فرض بلافاصله روی خوانشهای در حال پردازش تأثیر می‌گذارد. - - - 17, 17 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAM6SURBVDhPfZJdSFNxGMZPEUkE3XTTRVQX2dw5S+dOyygJ - Kiii7JOsFVqU6OZSpy4ty6ZB6rS0pgzLZV+KTsmPrTZU3CplbTY/ZsvprNaylrIp2ReBa0+HsYvA6Acv - /F/e53144P0Tf5MaTa4Vcck7qTzKKeSSw6IoKkdGEAtD4/+TxiXJdJr6JKFJZG9aDwmfQhpNQcSjqkOS - /7Igg47QZ0az8KQkE9WnDyB7QwSkMRykb6Ag5lG7Qrp/I+WTK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MGx7ii6UPrj0i - TKoL8KG8EGzyEvjqzmH0lBxjkkSwg4N5xMh+ncQl1Xu9J28ioOUCKrmAhkeYru7CZwOnzANuLTGGqTCM - CFZgmAzDeGoiPH099+x2+9L5K7BpV9ZOqpplPrXJ6P+X6ftc2e4IVLQ7/ZrWgcDl+3cCzwd0/q4Wm7ep - bNTb0WJ1Ox2K7u7uJQRBED8A6u/67pJqZjgAAAAASUVORK5CYII= - - - \ No newline at end of file diff --git a/ganjoor/Audio Support/UploadedNarrations.Designer.cs b/ganjoor/Audio Support/UploadedNarrations.Designer.cs deleted file mode 100644 index f38e476..0000000 --- a/ganjoor/Audio Support/UploadedNarrations.Designer.cs +++ /dev/null @@ -1,122 +0,0 @@ -namespace ganjoor.Audio_Support -{ - partial class UploadedNarrations - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.pnl = new System.Windows.Forms.Panel(); - this.grd = new System.Windows.Forms.DataGridView(); - this.lblStatus = new System.Windows.Forms.Label(); - this.cmbStatus = new System.Windows.Forms.ComboBox(); - this.pnl.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.grd)).BeginInit(); - this.SuspendLayout(); - // - // pnl - // - this.pnl.Controls.Add(this.cmbStatus); - this.pnl.Controls.Add(this.lblStatus); - this.pnl.Dock = System.Windows.Forms.DockStyle.Top; - this.pnl.Location = new System.Drawing.Point(0, 0); - this.pnl.Name = "pnl"; - this.pnl.Size = new System.Drawing.Size(867, 33); - this.pnl.TabIndex = 0; - // - // grd - // - this.grd.AllowUserToAddRows = false; - this.grd.AllowUserToDeleteRows = false; - this.grd.AllowUserToResizeRows = false; - this.grd.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.grd.Dock = System.Windows.Forms.DockStyle.Fill; - this.grd.Location = new System.Drawing.Point(0, 33); - this.grd.Name = "grd"; - this.grd.RowHeadersWidth = 62; - this.grd.RowTemplate.Height = 28; - this.grd.Size = new System.Drawing.Size(867, 447); - this.grd.TabIndex = 1; - // - // lblStatus - // - this.lblStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.lblStatus.AutoSize = true; - this.lblStatus.Location = new System.Drawing.Point(794, 6); - this.lblStatus.Name = "lblStatus"; - this.lblStatus.Size = new System.Drawing.Size(63, 19); - this.lblStatus.TabIndex = 0; - this.lblStatus.Text = "وضعیت:"; - // - // cmbStatus - // - this.cmbStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cmbStatus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbStatus.FormattingEnabled = true; - this.cmbStatus.Items.AddRange(new object[] { - "همه", - "پیش‌نویس", - "در انتظار بررسی", - "تأیید شده", - "رد شده"}); - this.cmbStatus.Location = new System.Drawing.Point(448, 3); - this.cmbStatus.Name = "cmbStatus"; - this.cmbStatus.Size = new System.Drawing.Size(340, 27); - this.cmbStatus.TabIndex = 1; - this.cmbStatus.SelectedIndexChanged += new System.EventHandler(this.cmbStatus_SelectedIndexChanged); - // - // UploadedNarrations - // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(867, 480); - this.Controls.Add(this.grd); - this.Controls.Add(this.pnl); - this.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(178))); - this.MinimizeBox = false; - this.Name = "UploadedNarrations"; - this.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.RightToLeftLayout = true; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "خوانشهای بارگذاری شده"; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.Load += new System.EventHandler(this.UploadedNarrations_LoadAsync); - this.pnl.ResumeLayout(false); - this.pnl.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.grd)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel pnl; - private System.Windows.Forms.DataGridView grd; - private System.Windows.Forms.ComboBox cmbStatus; - private System.Windows.Forms.Label lblStatus; - } -} \ No newline at end of file diff --git a/ganjoor/Audio Support/UploadedNarrations.cs b/ganjoor/Audio Support/UploadedNarrations.cs deleted file mode 100644 index 7bdc5a9..0000000 --- a/ganjoor/Audio Support/UploadedNarrations.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ganjoor.Audio_Support -{ - public partial class UploadedNarrations : Form - { - public UploadedNarrations() - { - InitializeComponent(); - cmbStatus.SelectedIndex = 1; - } - - private async Task LoadNarrations() - { - using (HttpClient httpClient = new HttpClient()) - { - httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Properties.Settings.Default.MuseumToken); - - Cursor = Cursors.WaitCursor; - Application.DoEvents(); - - //HttpResponseMessage response = await httpClient.GetAsync($"{Properties.Settings.Default.GanjoorServiceUrl}/api/audio?status={cmbStatus.SelectedIndex - 1}"); - HttpResponseMessage response = await httpClient.GetAsync($"{Properties.Settings.Default.GanjoorServiceUrl}/api/audio/uploads"); - if (response.StatusCode != HttpStatusCode.OK) - { - Cursor = Cursors.Default; - MessageBox.Show(response.ToString()); - return; - } - - grd.DataSource = await response.Content.ReadAsAsync(); - - } - Cursor = Cursors.Default; - } - - private async void UploadedNarrations_LoadAsync(object sender, EventArgs e) - { - await LoadNarrations(); - } - - private async void cmbStatus_SelectedIndexChanged(object sender, EventArgs e) - { - await LoadNarrations(); - } - } -} diff --git a/ganjoor/Audio Support/UploadedNarrations.resx b/ganjoor/Audio Support/UploadedNarrations.resx deleted file mode 100644 index 1af7de1..0000000 --- a/ganjoor/Audio Support/UploadedNarrations.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/ganjoor/ganjoor.csproj b/ganjoor/ganjoor.csproj index 08476ea..206a81d 100644 --- a/ganjoor/ganjoor.csproj +++ b/ganjoor/ganjoor.csproj @@ -137,24 +137,6 @@ GLogin.cs - - Form - - - NarrationProfile.cs - - - Form - - - NarrationProfiles.cs - - - Form - - - UploadedNarrations.cs - @@ -398,15 +380,6 @@ GLogin.cs - - NarrationProfile.cs - - - NarrationProfiles.cs - - - UploadedNarrations.cs - GeneralTextImporter.cs