/// <summary> /// Deletes the letter head confirmation handler. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void DeleteLetterHeadConfirmationHandler(object sender, EventArgs e) { if (((Form)sender).DialogResult == DialogResult.Yes) { string picPath = Path.Combine(mstrDirectory, txtLetterHead.Text); imgLogo.ImageName = Path.Combine(VWGContext.Current.Config.GetDirectory("Images"), "no_photo.jpg"); if (File.Exists(picPath)) { try { File.Delete(picPath); if (SystemInfoEx.ClearLogoInfo(SystemInfoEx.CurrentInfo.Default.SysInfo.InfoId)) { MessageBox.Show("The picture '" + txtLetterHead.Text + "' is deleted.", "Deleted", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { MessageBox.Show("The picture does not exist in database.", "Delete Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception exc) { MessageBox.Show(exc.Message, "Delete Failed!"); } } } }
private RenderTexture CreateRenderTexture(int size) { RenderTextureFormat renderTextureFormat = SystemInfoEx.SupportsRenderTextureFormat((RenderTextureFormat)15) ? (RenderTextureFormat)15 : (RenderTextureFormat)14; RenderTexture renderTexture = new RenderTexture(size, size, 0, renderTextureFormat, (RenderTextureReadWrite)1); ((Texture)renderTexture).set_filterMode((FilterMode)1); ((Texture)renderTexture).set_wrapMode((TextureWrapMode)1); renderTexture.Create(); return(renderTexture); }
private RenderTexture CreateRenderTexture(int size) { RenderTexture renderTexture = new RenderTexture(size, size, 0, (SystemInfoEx.SupportsRenderTextureFormat(RenderTextureFormat.RHalf) ? RenderTextureFormat.RHalf : RenderTextureFormat.RFloat), RenderTextureReadWrite.Linear) { filterMode = FilterMode.Bilinear, wrapMode = TextureWrapMode.Clamp }; renderTexture.Create(); return(renderTexture); }