|
Considering this is an invention of your own and you haven't told us ANYTHING at all about your code, how it works, what you've done to implement this "private chat", or even compared it to how you're doing "public chat", it's pretty much impossible to tell you anything useful.
|
|
|
|
|
What exactly is your question? You dumped a bunch of code that none of us will likely take the time to review and understand and then did not ask a specific question.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Good afternoon,
in my project I have a button inside a gridvew that clicking opens a form.
This form is what I fill in two columns of the grid.
wanted to know how I program the button to open the form.
My code:
//Preenche template registos
templateRegistar.AllowAddNewRow = false;
templateRegistar.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
templateRegistar.Caption = "Registo de Lavagem de Fardamento";
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Nº Ticket", FieldName = "SYS_Registo_Entrega.SYS_Ticket.Ticket_ID", IsVisible = true });
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Fardamento", FieldName = "Fardamento_Funcionario.Fardamento.Descricao", IsVisible = true });
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Quantidade", FieldName = "Quantidade", IsVisible = true });
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Utilizador", FieldName = "SYS_Utilizador.Funcionario.Nome_Funcionario", IsVisible = true });
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Data Entrega", FieldName = "DtEntrega", IsVisible = true });
templateRegistar.Columns.Add(new GridViewComboBoxColumn { HeaderText = "Utilizador", FieldName = "Utilizador_IDLevantamento", IsVisible = true });
templateRegistar.Columns.Add(new GridViewComboBoxColumn { HeaderText = "Data Levantamento", FieldName = "DtLevantamento", IsVisible = true });
templateRegistar.Columns.Add(new GridViewCommandColumn { HeaderText = "", DefaultText = "Registar Levantamento", UseDefaultText = true, MaxWidth = 150, Name = "Levantamento" });
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Num_Mecanografico_Funcionario", FieldName = "Num_Mecanografico_Funcionario", IsVisible = false });
GridViewRelation relationRegistar = new GridViewRelation(radGridViewFuncionarios.MasterTemplate);
relationRegistar.ChildTemplate = templateRegistar;
relationRegistar.RelationName = "FuncionarioLavagem";
relationRegistar.ParentColumnNames.Add("Num_Mecanografico_Funcionario");
relationRegistar.ChildColumnNames.Add("Num_Mecanografico_Funcionario");
radGridViewFuncionarios.Relations.Add(relationRegistar);
radGridViewFuncionarios.CommandCellClick += radGridViewFuncionarios_CommandCellClick;
//Botao registar Levantamento
void radGridViewFuncionarios_CommandCellClick1(object sender, EventArgs e)
{
GridCommandCellElement click = (GridCommandCellElement)sender;
SYS_Registo_Entrega row = click.RowInfo.DataBoundItem as SYS_Registo_Entrega;
RegistarLevantamento reg = new RegistarLevantamento(row);
if (reg.ShowDialog() == DialogResult.OK)
{
PreencheFuncionarios(); // se foi adicionado novo funcionario a BD, entao atualiza a lista
}
}
|
|
|
|
|
First I suggest you have a good rat through Teleriks demos, they are usually pretty comprehensive. That should show you how to wire up the buttons and identify the content of the row that was clicked.
From that information you can get the data from the underlying collection to be passed to the second form.
Once you have that do some research on passing data between forms - there are plenty of examples.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i'am trouble to execute base encode 64
this is the error message:
The name 'EncodePasswordToBase64' does not exist in the current context
|
|
|
|
|
Base64 is not an encryption function: it is a translation function. As a result, it is about as secure as having your password tattooed on your forehead backwards so nobody can read it except you with a mirror.
Stop trying to encrypt passwords at all - it is a very poor idea: Password Storage: How to do it.[^]
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
thanks but
what is lacking for the program, please solution. thanks
|
|
|
|
|
How are we supposed to know?
All you've said is that some symbol is not found in your code, which means you haven't defined it anywhere. Chances are really good you copied and pasted some code from somewhere and you have no idea what it does or how it works, correct? Well, we don't know what that symbol is supposed to be either.
Griff is correct. It looks like you're trying to encrypt a password. DO NOT DO THIS! He already gave a link to show you how to hash and store passwords correctly. Use it.
|
|
|
|
|
this is the code, the problem still to same like above ??
public static string EncodePasswordToBase64(string password)
{
try
{
byte[] encData_byte = new byte[password.Length];
encData_byte = System.Text.Encoding.UTF8.GetBytes(password);
string encodedData = Convert.ToBase64String(encData_byte);
return encodedData;
}
catch (Exception ex)
{
throw new Exception("Error in base64Encode" + ex.Message);
}
}
public string DecodeFrom64(string encodedData)
{
System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
System.Text.Decoder utf8Decode = encoder.GetDecoder();
byte[] todecode_byte = Convert.FromBase64String(encodedData);
int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
char[] decoded_char = new char[charCount];
utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
string result = new String(decoded_char);
return result;
}
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text=EncodePasswordToBase64(TextBox1.Text);
}
protected void Button2_Click(object sender, EventArgs e)
{
Label1.Text = DecodeFrom64(Label1.Text);}
|
|
|
|
|
Are all of these functions in the same class?
|
|
|
|
|
I hope your not uSing this code to "encrypt" anything because this is not encryption.
Get rid of the "static" keyword on the EncodePasswordToBase64 method definition line.
|
|
|
|
|
thanks for the solution
|
|
|
|
|
hi every one ,
if i have any combobox filled with column in any table (MemeberValue, DataSource, DisplayName)
and i need to change the text of this combo if i know the MemeberValue(ID).
how can i do that ??
|
|
|
|
|
That will depend on what UI you are using, winforms/wpf/silverlight/asp and that is just the common ones.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
When you want to change the text? When _SelectedIndexChanged event fired?
|
|
|
|
|
hello i am writing an that application that can read a pdf file, get values from a pdf file and display in the application. . sofar i cannot retrive it on the pdf controler. please help
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication13
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog();
dialog.Filter = "PDF document (*.pdf)|*.pdf";
DialogResult result = dialog.ShowDialog();
if (result == DialogResult.OK)
{
try
{
string pdfFile = dialog.FileName;
//this.axFoxitReaderOCX1.LoadFromFile(javascript.pdf);
}
catch (Exception exe)
{
MessageBox.Show(exe.Message, "Spire.PdfViewer Demo", MessageBoxButtons.OK, MessageBoxIcon.Error);
string path = @"C:\users\library\livhuwani\Documents\books.pdf";
System.Diagnostics.Process.Start("", path);
}
}
}
}
}
|
|
|
|
|
So, basically, you haven't done anything?
Start here: Extract Text from PDF in C# (100% .NET)[^] and come back when you have a specific problem - we aren't going to do it all for you!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
livhuone wrote: sofar i cannot retrive it on the pdf controler. please help I'm sorry but you need to give specific details of where in your code the errors occur, and exactly what they are.
|
|
|
|
|
Hello,
I am writing a lengthy list of all of the folders to a List<string>. I am doing that on BackgroundWorker1. I have a second background worker that sleeps for one minute and then starts pulling the information to the list. My problem is that I do not know how to keep the loop going until the List created in the first Background Worker has ended. This is what I have and I know it is wrong.
<pre lang="c#"> private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
{
System.Threading.Thread.Sleep(60000);
int KeepCounting=0;
listBox1.Invoke((Action)(() => listBox1.Items.Add("Starting Scan : " + DateTime.Now.ToString())));
while (KeepCounting < variables.foldersToSearch.Count)
{
listBox1.Invoke((Action)(() => listBox1.Items.Add(variables.foldersToSearch[KeepCounting])));
KeepCounting++;
toolStripStatusLabel1.Text = " Searched " + KeepCounting.ToString() + " folders.";
}
}</pre>
|
|
|
|
|
The biggest problem with doing what you're doing is that List<t> isn't thread safe. You really shouldn't be trying to Add and Remove items from the List<t> without synchronization in place to avoid nasty little bugs that you're going to have a hell of a time reproducing.
Read:
Quote: Public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
It is safe to perform multiple read operations on a List<t>, but issues can occur if the collection is modified while it’s being read. To ensure thread safety, lock the collection during a read or write operation. To enable a collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization. For collections with built-in synchronization, see the classes in the System.Collections.Concurrent namespace. For an inherently thread–safe alternative, see the ImmutableList class.
A better alternative would be to use a ConcurrentQueue<t>[^] instead.
|
|
|
|
|
Hi.
I need a tutorial about how to make a Custom Autoupdater cuz i can do 1 by myself :I
no clickonce pls it ins't customizable
someone can help me plz
|
|
|
|
|
The best way for you to tackle this is for you to start defining your requirements. Saying you want an autoupdater is only the start - you need to break that down. For instance, do you want it to be updated from a local network only, or should it be available via the Internet as well? Does the update process require authentication or a license? You need to get a full list of your desired features, and then you start by breaking each part down into manageable tasks.
|
|
|
|
|
|
GuyThiebaut wrote: Here is some codez 4 U 2 look @:
Are you OK? Did you hit your head on something? How many fingers am I holding up ?
|
|
|
|